mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-23 21:00:37 +02:00
[backfire] backport r23318
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@23324 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
8da83a1c65
commit
e03b255302
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=firewall
|
||||
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=19
|
||||
PKG_RELEASE:=20
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
@ -388,10 +388,11 @@ fw_rule() {
|
||||
[ -n "$dest" ] && TARGET="zone_${dest}_${TARGET}"
|
||||
fi
|
||||
|
||||
eval 'RULE_COUNT=$((++RULE_COUNT_'$ZONE'))'
|
||||
local pos
|
||||
eval 'pos=$((++FW__RULE_COUNT_'$ZONE'))'
|
||||
|
||||
add_rule() {
|
||||
$IPTABLES -t $TABLE -I $ZONE $RULE_COUNT \
|
||||
$IPTABLES -t $TABLE -I $ZONE $pos \
|
||||
$srcaddr $destaddr \
|
||||
${proto:+-p $proto} \
|
||||
${icmp_type:+--icmp-type $icmp_type} \
|
||||
@ -501,7 +502,10 @@ fw_redirect() {
|
||||
get_portrange destports "${dest_port-$src_dport}" ":"
|
||||
|
||||
add_rule() {
|
||||
$IPTABLES -I $natchain 1 -t nat \
|
||||
local pos
|
||||
eval 'pos=$((++FW__REDIR_COUNT_'$natchain'))'
|
||||
|
||||
$IPTABLES -I $natchain $pos -t nat \
|
||||
$srcaddr $srcdaddr \
|
||||
${proto:+-p $proto} \
|
||||
${srcports:+--sport $srcports} \
|
||||
|
Loading…
Reference in New Issue
Block a user