summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-24 21:59:16 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-24 21:59:16 +0000
commit7c52bc2d37cb8766e5774cc3dd7578677706bd7b (patch)
treecc0473cd650c7e4cb83c6f0e81ddf29ebfafed31 /package
parent749a00acf3d00fd360d32eb8c79530b212d147f4 (diff)
firewall: add sanity checks to zone default rules (patch from #5459)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17713 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-xpackage/firewall/files/uci_firewall.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/firewall/files/uci_firewall.sh b/package/firewall/files/uci_firewall.sh
index 44dd48b4e..3c13631a3 100755
--- a/package/firewall/files/uci_firewall.sh
+++ b/package/firewall/files/uci_firewall.sh
@@ -56,9 +56,9 @@ create_zone() {
$IPTABLES -N zone_$1_DROP
$IPTABLES -N zone_$1_REJECT
$IPTABLES -N zone_$1_forward
- $IPTABLES -A zone_$1_forward -j zone_$1_$5
- $IPTABLES -A zone_$1 -j zone_$1_$3
- $IPTABLES -A output -j zone_$1_$4
+ [ "$5" ] && $IPTABLES -A zone_$1_forward -j zone_$1_$5
+ [ "$3" ] && $IPTABLES -A zone_$1 -j zone_$1_$3
+ [ "$4" ] && $IPTABLES -A output -j zone_$1_$4
$IPTABLES -N zone_$1_nat -t nat
$IPTABLES -N zone_$1_prerouting -t nat
$IPTABLES -t raw -N zone_$1_notrack