From 390b2e6dcaf1b3a5f0ef17c1c0282f8d8645e500 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 19 May 2010 01:55:46 +0000 Subject: [package] firewall: implement disable_ipv6 uci option git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21503 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/firewall/files/lib/fw.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'package/firewall/files/lib/fw.sh') diff --git a/package/firewall/files/lib/fw.sh b/package/firewall/files/lib/fw.sh index 72aa37c5bf..1dd5227c16 100644 --- a/package/firewall/files/lib/fw.sh +++ b/package/firewall/files/lib/fw.sh @@ -72,7 +72,7 @@ fw__exec() { # { } if [ $tab == '-' ]; then type $app > /dev/null 2> /dev/null fw__rc $(($? & 1)) - return + return fi local mod eval "mod=\$FW_${fam}_${tab}" @@ -85,7 +85,7 @@ fw__exec() { #
{ } 6) mod=ip6table_${tab} ;; *) mod=. ;; esac - grep "^${mod} " /proc/modules > /dev/null + grep -q "^${mod} " /proc/modules mod=$? export FW_${fam}_${tab}=$mod fw__rc $mod @@ -100,8 +100,8 @@ fw__exec() { #
{ } local app= local pol= case "$fam" in - 4) app=iptables ;; - 6) app=ip6tables ;; + 4) [ $FW_DISABLE_IPV4 == 0 ] && app=iptables || return ;; + 6) [ $FW_DISABLE_IPV6 == 0 ] && app=ip6tables || return ;; i) fw__dualip "$@"; return ;; I) fw__autoip "$@"; return ;; e) app=ebtables ;; -- cgit v1.2.3