[backfire] backport r25179
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 27 Jan 2011 22:20:31 +0000 (22:20 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 27 Jan 2011 22:20:31 +0000 (22:20 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@25180 3c298f89-4303-0410-b956-a3cf2f4a3e73

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} \