aboutsummaryrefslogtreecommitdiffstats
path: root/package/firewall/files/lib/fw.sh
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-09-05 20:17:23 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-09-05 20:17:23 +0000
commitca7164cb5a53b1725cac81e3233de9171f7e1597 (patch)
treedcc51f546ca31b046edc0ee3372d5ed7cb5620c2 /package/firewall/files/lib/fw.sh
parent9edcfdff2df158fc516cea5f155c5fffc016a30c (diff)
downloadupstream-ca7164cb5a53b1725cac81e3233de9171f7e1597.tar.gz
upstream-ca7164cb5a53b1725cac81e3233de9171f7e1597.tar.bz2
upstream-ca7164cb5a53b1725cac81e3233de9171f7e1597.zip
[package] firewall:
- fix possible endless loop when the family option is used for forwardings - only generate forwarding rules in SNAT redirect sections if src_dip is specified git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22938 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/firewall/files/lib/fw.sh')
-rw-r--r--package/firewall/files/lib/fw.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/firewall/files/lib/fw.sh b/package/firewall/files/lib/fw.sh
index 819aa48eae..aaf3d14ef0 100644
--- a/package/firewall/files/lib/fw.sh
+++ b/package/firewall/files/lib/fw.sh
@@ -149,7 +149,7 @@ fw__exec() { # <action> <family> <table> <chain> <target> <position> { <rules> }
fi
case "$fam" in
- G*) shift; while [ "$1" != "{" ]; do shift; done ;;
+ G*) shift; while [ $# -gt 0 ] && [ "$1" != "{" ]; do shift; done ;;
esac
if [ $# -gt 0 ]; then