summaryrefslogtreecommitdiff
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
commit5ab58aa39c43eca75866fc478445821bb45b4125 (patch)
treea13e53386bdb9e6c64ce6388429517b2409c12bd /package/firewall/files/lib/fw.sh
parenteb79296cc10f6168892278b4aa921566178b1f20 (diff)
downloadmtk-20170518-5ab58aa39c43eca75866fc478445821bb45b4125.zip
mtk-20170518-5ab58aa39c43eca75866fc478445821bb45b4125.tar.gz
mtk-20170518-5ab58aa39c43eca75866fc478445821bb45b4125.tar.bz2
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
SVN-Revision: 22938
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 819aa48..aaf3d14 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