summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-09-14 15:18:48 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-09-14 15:18:48 +0000
commit8df03c85fe0b83e0a7508298591ae92b4c13c986 (patch)
tree49bfc7cd0033e4732bd262fbdf368bb0a6c90a57 /package
parent715285dd439e12b1a5d87c25a601457a282d2deb (diff)
downloadmtk-20170518-8df03c85fe0b83e0a7508298591ae92b4c13c986.zip
mtk-20170518-8df03c85fe0b83e0a7508298591ae92b4c13c986.tar.gz
mtk-20170518-8df03c85fe0b83e0a7508298591ae92b4c13c986.tar.bz2
firewall: move the config_get out of the loop, no need to call it multiple times
SVN-Revision: 17581
Diffstat (limited to 'package')
-rw-r--r--package/firewall/files/20-firewall5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/firewall/files/20-firewall b/package/firewall/files/20-firewall
index 32f8a85..1cfc1b9 100644
--- a/package/firewall/files/20-firewall
+++ b/package/firewall/files/20-firewall
@@ -27,9 +27,10 @@ config_foreach load_zones zone
}
[ ifdown = "$ACTION" ] && {
+ local up
+ config_get up "$INTERFACE" up
+
for z in $ZONE; do
- local up
- config_get up "$INTERFACE" up
[ "$up" == "1" ] && delif "$INTERFACE" "$ifname" "$z"
done
}