From: jow Date: Mon, 14 Sep 2009 15:18:48 +0000 (+0000) Subject: [package] firewall: move the config_get out of the loop, no need to call it multiple... X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=commitdiff_plain;h=0228176586d442416f0000a4fcf2cfa5686241bc [package] firewall: move the config_get out of the loop, no need to call it multiple times git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17581 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/firewall/files/20-firewall b/package/firewall/files/20-firewall index 32f8a853d..1cfc1b9c0 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 }