summaryrefslogtreecommitdiffstats
path: root/etc/rc.network
diff options
context:
space:
mode:
authordarrenr <darrenr@FreeBSD.org>2001-10-20 04:41:47 +0000
committerdarrenr <darrenr@FreeBSD.org>2001-10-20 04:41:47 +0000
commitc34948e3219e4713d5eae5536229dadde5acaf65 (patch)
tree4091845a7f0d88004acf65065e82951da2423234 /etc/rc.network
parent2d265de5c77447613cf70a3384606137f5f45363 (diff)
downloadFreeBSD-src-c34948e3219e4713d5eae5536229dadde5acaf65.zip
FreeBSD-src-c34948e3219e4713d5eae5536229dadde5acaf65.tar.gz
Allow ipnat_enable to be set to "yes" without requiring ipfiltre_enable to
be set to "yes" PR: 25223
Diffstat (limited to 'etc/rc.network')
-rw-r--r--etc/rc.network27
1 files changed, 16 insertions, 11 deletions
diff --git a/etc/rc.network b/etc/rc.network
index 51c2926..340be28 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -85,17 +85,6 @@ network_pass1() {
${ipmon_program:-/sbin/ipmon} ${ipmon_flags}
;;
esac
- case "${ipnat_enable}" in
- [Yy][Ee][Ss])
- if [ -r "${ipnat_rules}" ]; then
- echo -n ' ipnat';
- eval ${ipnat_program:-/sbin/ipnat -CF -f} \
- "${ipnat_rules}" ${ipnat_flags}
- else
- echo -n ' NO IPNAT RULES'
- fi
- ;;
- esac
case "${ipfs_enable}" in
[Yy][Ee][Ss])
if [ -r "/var/db/ipf/ipstate.ipf" ]; then
@@ -109,6 +98,22 @@ network_pass1() {
ipfilter_enable="NO"
echo -n ' NO IPF RULES'
fi
+ esac
+ case "${ipnat_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 "${ipnat_rules}" ]; then
+ echo -n ' ipnat';
+ eval ${ipnat_program:-/sbin/ipnat -CF -f} \
+ "${ipnat_rules}" ${ipnat_flags}
+ else
+ echo -n ' NO IPNAT RULES'
+ fi
;;
esac
OpenPOWER on IntegriCloud