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 | 887cbd0e5977f9ec3553d56a022b24f9c7a1d441 (patch) | |
tree | cec215f15442293b598680242ad76459a9c2d654 /package/firewall/files/lib | |
parent | 305bea982cb78523bd105ac92a07248da4d7b3d9 (diff) | |
download | upstream-887cbd0e5977f9ec3553d56a022b24f9c7a1d441.tar.gz upstream-887cbd0e5977f9ec3553d56a022b24f9c7a1d441.tar.bz2 upstream-887cbd0e5977f9ec3553d56a022b24f9c7a1d441.zip |
[package] firewall: fix wrong rule order if multiple protocols are used
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25179 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/firewall/files/lib')
-rw-r--r-- | package/firewall/files/lib/core_rule.sh | 6 |
1 files changed, 3 insertions, 3 deletions
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} \ |