Merge in patch to automagically decide whether or not a kldload of ipfilter

is required into rc.network.

Person failed to use a real name so both email addresses from PR included
(Sent was different to From).

PR:		22998
Submitted by:	dl@leo.org/spock@empire.trek.org
This commit is contained in:
Darren Reed 2001-07-30 23:12:02 +00:00
parent 0a6ca2a733
commit e58f466620
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=80683
7 changed files with 91 additions and 0 deletions

View file

@ -60,8 +60,21 @@ network_pass1() {
# Establish ipfilter ruleset as early as possible (best in
# addition to IPFILTER_DEFAULT_BLOCK in the kernel config file)
#
if /sbin/ipfstat -i > /dev/null 2>&1; then
ipfilter_in_kernel=1
else
ipfilter_in_kernel=0
fi
case "${ipfilter_enable}" in
[Yy][Ee][Ss])
if [ "${ipfilter_in_kernel}" -eq 0 ] && kldload ipl; then
ipfilter_in_kernel=1
echo "Kernel ipfilter module loaded."
elif [ "${ipfilter_in_kernel}" -eq 0 ]; then
echo "Warning: ipfilter kernel module failed to load."
fi
if [ -r "${ipfilter_rules}" ]; then
echo -n ' ipfilter';
${ipfilter_program:-/sbin/ipf -Fa -f} \

View file

@ -60,8 +60,21 @@ network_pass1() {
# Establish ipfilter ruleset as early as possible (best in
# addition to IPFILTER_DEFAULT_BLOCK in the kernel config file)
#
if /sbin/ipfstat -i > /dev/null 2>&1; then
ipfilter_in_kernel=1
else
ipfilter_in_kernel=0
fi
case "${ipfilter_enable}" in
[Yy][Ee][Ss])
if [ "${ipfilter_in_kernel}" -eq 0 ] && kldload ipl; then
ipfilter_in_kernel=1
echo "Kernel ipfilter module loaded."
elif [ "${ipfilter_in_kernel}" -eq 0 ]; then
echo "Warning: ipfilter kernel module failed to load."
fi
if [ -r "${ipfilter_rules}" ]; then
echo -n ' ipfilter';
${ipfilter_program:-/sbin/ipf -Fa -f} \

View file

@ -60,8 +60,21 @@ network_pass1() {
# Establish ipfilter ruleset as early as possible (best in
# addition to IPFILTER_DEFAULT_BLOCK in the kernel config file)
#
if /sbin/ipfstat -i > /dev/null 2>&1; then
ipfilter_in_kernel=1
else
ipfilter_in_kernel=0
fi
case "${ipfilter_enable}" in
[Yy][Ee][Ss])
if [ "${ipfilter_in_kernel}" -eq 0 ] && kldload ipl; then
ipfilter_in_kernel=1
echo "Kernel ipfilter module loaded."
elif [ "${ipfilter_in_kernel}" -eq 0 ]; then
echo "Warning: ipfilter kernel module failed to load."
fi
if [ -r "${ipfilter_rules}" ]; then
echo -n ' ipfilter';
${ipfilter_program:-/sbin/ipf -Fa -f} \

View file

@ -60,8 +60,21 @@ network_pass1() {
# Establish ipfilter ruleset as early as possible (best in
# addition to IPFILTER_DEFAULT_BLOCK in the kernel config file)
#
if /sbin/ipfstat -i > /dev/null 2>&1; then
ipfilter_in_kernel=1
else
ipfilter_in_kernel=0
fi
case "${ipfilter_enable}" in
[Yy][Ee][Ss])
if [ "${ipfilter_in_kernel}" -eq 0 ] && kldload ipl; then
ipfilter_in_kernel=1
echo "Kernel ipfilter module loaded."
elif [ "${ipfilter_in_kernel}" -eq 0 ]; then
echo "Warning: ipfilter kernel module failed to load."
fi
if [ -r "${ipfilter_rules}" ]; then
echo -n ' ipfilter';
${ipfilter_program:-/sbin/ipf -Fa -f} \

View file

@ -60,8 +60,21 @@ network_pass1() {
# Establish ipfilter ruleset as early as possible (best in
# addition to IPFILTER_DEFAULT_BLOCK in the kernel config file)
#
if /sbin/ipfstat -i > /dev/null 2>&1; then
ipfilter_in_kernel=1
else
ipfilter_in_kernel=0
fi
case "${ipfilter_enable}" in
[Yy][Ee][Ss])
if [ "${ipfilter_in_kernel}" -eq 0 ] && kldload ipl; then
ipfilter_in_kernel=1
echo "Kernel ipfilter module loaded."
elif [ "${ipfilter_in_kernel}" -eq 0 ]; then
echo "Warning: ipfilter kernel module failed to load."
fi
if [ -r "${ipfilter_rules}" ]; then
echo -n ' ipfilter';
${ipfilter_program:-/sbin/ipf -Fa -f} \

View file

@ -60,8 +60,21 @@ network_pass1() {
# Establish ipfilter ruleset as early as possible (best in
# addition to IPFILTER_DEFAULT_BLOCK in the kernel config file)
#
if /sbin/ipfstat -i > /dev/null 2>&1; then
ipfilter_in_kernel=1
else
ipfilter_in_kernel=0
fi
case "${ipfilter_enable}" in
[Yy][Ee][Ss])
if [ "${ipfilter_in_kernel}" -eq 0 ] && kldload ipl; then
ipfilter_in_kernel=1
echo "Kernel ipfilter module loaded."
elif [ "${ipfilter_in_kernel}" -eq 0 ]; then
echo "Warning: ipfilter kernel module failed to load."
fi
if [ -r "${ipfilter_rules}" ]; then
echo -n ' ipfilter';
${ipfilter_program:-/sbin/ipf -Fa -f} \

View file

@ -60,8 +60,21 @@ network_pass1() {
# Establish ipfilter ruleset as early as possible (best in
# addition to IPFILTER_DEFAULT_BLOCK in the kernel config file)
#
if /sbin/ipfstat -i > /dev/null 2>&1; then
ipfilter_in_kernel=1
else
ipfilter_in_kernel=0
fi
case "${ipfilter_enable}" in
[Yy][Ee][Ss])
if [ "${ipfilter_in_kernel}" -eq 0 ] && kldload ipl; then
ipfilter_in_kernel=1
echo "Kernel ipfilter module loaded."
elif [ "${ipfilter_in_kernel}" -eq 0 ]; then
echo "Warning: ipfilter kernel module failed to load."
fi
if [ -r "${ipfilter_rules}" ]; then
echo -n ' ipfilter';
${ipfilter_program:-/sbin/ipf -Fa -f} \