diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-01-27 22:19:53 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-01-27 22:19:53 +0000 |
commit | 04b20727d876d0af23aa83cd7bc2444e1c1b18d5 (patch) | |
tree | 9ae09a5a649f08e95a36fdc5ff15ab3a6f15d548 /package | |
parent | ea0d6e6b1b72ce0f88c5b2f184a1e5025ad56559 (diff) | |
download | upstream-04b20727d876d0af23aa83cd7bc2444e1c1b18d5.tar.gz upstream-04b20727d876d0af23aa83cd7bc2444e1c1b18d5.tar.bz2 upstream-04b20727d876d0af23aa83cd7bc2444e1c1b18d5.zip |
firewall: fix wrong rule order if multiple protocols are used
SVN-Revision: 25179
Diffstat (limited to 'package')
-rw-r--r-- | package/firewall/Makefile | 2 | ||||
-rw-r--r-- | package/firewall/files/lib/core_rule.sh | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/package/firewall/Makefile b/package/firewall/Makefile index 1b6ec88099..4a8a5d3199 100644 --- a/package/firewall/Makefile +++ b/package/firewall/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=firewall PKG_VERSION:=2 -PKG_RELEASE:=20 +PKG_RELEASE:=21 include $(INCLUDE_DIR)/package.mk diff --git a/package/firewall/files/lib/core_rule.sh b/package/firewall/files/lib/core_rule.sh index 9443eef8cf..8c234a33a1 100644 --- a/package/firewall/files/lib/core_rule.sh +++ b/package/firewall/files/lib/core_rule.sh @@ -52,11 +52,11 @@ fw_load_rule() { fw_get_negation src_spec '-s' "${rule_src_ip:+$rule_src_ip/$rule_src_ip_prefixlen}" fw_get_negation dest_spec '-d' "${rule_dest_ip:+$rule_dest_ip/$rule_dest_ip_prefixlen}" - local rule_pos - eval 'rule_pos=$((++FW__RULE_COUNT_'${mode#G}'_'$chain'))' - [ "$rule_proto" == "tcpudp" ] && rule_proto="tcp udp" for rule_proto in $rule_proto; do + local rule_pos + eval 'rule_pos=$((++FW__RULE_COUNT_'${mode#G}'_'$chain'))' + fw add $mode $table $chain $target $rule_pos { $rule_src_ip $rule_dest_ip } { \ $src_spec $dest_spec \ ${rule_proto:+-p $rule_proto} \ |