[backfire] backport r25179
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 27 Jan 2011 22:20:31 +0000 (22:20 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 27 Jan 2011 22:20:31 +0000 (22:20 +0000)
SVN-Revision: 25180

package/firewall/Makefile
package/firewall/files/uci_firewall.sh

index dc61f7c758b1e503a6faea1ac9da6f9fd954ec03..8b80377d4a83cb901be90e38845c24144bdcb138 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=firewall
 
 PKG_VERSION:=1
-PKG_RELEASE:=20
+PKG_RELEASE:=21
 
 include $(INCLUDE_DIR)/package.mk
 
index be6620d1912ea2724202b6e37dbb7a67e53c38b6..b8e9f829bd73baccf49e4fd9613eb1078c54c7c4 100755 (executable)
@@ -388,10 +388,10 @@ fw_rule() {
                [ -n "$dest" ] && TARGET="zone_${dest}_${TARGET}"
        fi
 
-       local pos
-       eval 'pos=$((++FW__RULE_COUNT_'$ZONE'))'
-
        add_rule() {
+               local pos
+               eval 'pos=$((++FW__RULE_COUNT_'$ZONE'))'
+
                $IPTABLES -t $TABLE -I $ZONE $pos \
                        $srcaddr $destaddr \
                        ${proto:+-p $proto} \