aboutsummaryrefslogtreecommitdiffstats
path: root/package/firewall
diff options
context:
space:
mode:
authorDaniel Dickinson <daniel@cshore.neomailbox.net>2011-07-06 06:26:12 +0000
committerDaniel Dickinson <daniel@cshore.neomailbox.net>2011-07-06 06:26:12 +0000
commit54aa8cb28a3a2118e28b893f64002184174de567 (patch)
tree2e5f79c1f9befffe14d765dbfdeb9ea8f899dd28 /package/firewall
parent16113ee0b15f13349caa860b73200f10c052b074 (diff)
downloadupstream-54aa8cb28a3a2118e28b893f64002184174de567.tar.gz
upstream-54aa8cb28a3a2118e28b893f64002184174de567.tar.bz2
upstream-54aa8cb28a3a2118e28b893f64002184174de567.zip
[package] firewall: fix udp rules for tcpudp proto rules using src_port and dest_port after modification by the parsing of the tcp rule
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27469 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/firewall')
-rw-r--r--package/firewall/files/lib/core_rule.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/package/firewall/files/lib/core_rule.sh b/package/firewall/files/lib/core_rule.sh
index 64a510df92..55381598b5 100644
--- a/package/firewall/files/lib/core_rule.sh
+++ b/package/firewall/files/lib/core_rule.sh
@@ -65,8 +65,15 @@ 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_src_port_copy
+ local rule_dest_port_copy
+
[ "$rule_proto" == "tcpudp" ] && rule_proto="tcp udp"
+ rule_src_port_copy="$rule_src_port"
+ rule_dest_port_copy="$rule_dest_port"
for rule_proto in $rule_proto; do
+ rule_src_port="$rule_src_port_copy"
+ rule_dest_port="$rule_dest_port_copy"
fw_get_negation rule_proto '-p' "$rule_proto"
for rule_src_port in ${rule_src_port:-""}; do
fw_get_port_range rule_src_port $rule_src_port