diff options
author | darrenr <darrenr@FreeBSD.org> | 2001-10-20 04:41:47 +0000 |
---|---|---|
committer | darrenr <darrenr@FreeBSD.org> | 2001-10-20 04:41:47 +0000 |
commit | c34948e3219e4713d5eae5536229dadde5acaf65 (patch) | |
tree | 4091845a7f0d88004acf65065e82951da2423234 /etc/rc.d/routing | |
parent | 2d265de5c77447613cf70a3384606137f5f45363 (diff) | |
download | FreeBSD-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.d/routing')
-rw-r--r-- | etc/rc.d/routing | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 51c2926..340be28 100644 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -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 |