diff options
author | ume <ume@FreeBSD.org> | 2009-12-02 15:05:26 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2009-12-02 15:05:26 +0000 |
commit | ba7665678f35b37968e0734f1086fc8fe7143340 (patch) | |
tree | d274f4a3f20bd30ff98ae13a63f13accbcd8cba4 /etc/rc.d/ipfw | |
parent | b26098335ad13f28d7c5848b7616741f750e786e (diff) | |
download | FreeBSD-src-ba7665678f35b37968e0734f1086fc8fe7143340.zip FreeBSD-src-ba7665678f35b37968e0734f1086fc8fe7143340.tar.gz |
Unify rc.firewall and rc.firewall6, and obsolete rc.firewall6
and rc.d/ip6fw.
Reviewed by: dougb, jhb
MFC after: 1 month
Diffstat (limited to 'etc/rc.d/ipfw')
-rwxr-xr-x | etc/rc.d/ipfw | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/etc/rc.d/ipfw b/etc/rc.d/ipfw index 872f278..dd7ab55 100755 --- a/etc/rc.d/ipfw +++ b/etc/rc.d/ipfw @@ -17,6 +17,8 @@ start_precmd="ipfw_prestart" stop_cmd="ipfw_stop" required_modules="ipfw" +set_rcvar_obsolete ipv6_firewall_enable + ipfw_prestart() { if checkyesno dummynet_enable; then @@ -61,7 +63,13 @@ ipfw_start() # Enable the firewall # if ! ${SYSCTL_W} net.inet.ip.fw.enable=1 1>/dev/null 2>&1; then - warn "failed to enable firewall" + warn "failed to enable IPv4 firewall" + fi + if afexists inet6; then + if ! ${SYSCTL_W} net.inet6.ip6.fw.enable=1 1>/dev/null 2>&1 + then + warn "failed to enable IPv6 firewall" + fi fi } @@ -70,6 +78,9 @@ ipfw_stop() # Disable the firewall # ${SYSCTL_W} net.inet.ip.fw.enable=0 + if afexists inet6; then + ${SYSCTL_W} net.inet6.ip6.fw.enable=0 + fi if [ -f /etc/rc.d/natd ] ; then /etc/rc.d/natd quietstop fi |