projects
/
openwrt
/
staging
/
neocturne.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35078a6
)
Unify portrange-support in firewall rule generator fixes #4404
author
Steven Barth
<cyrus@openwrt.org>
Thu, 1 Jan 2009 13:05:16 +0000
(13:05 +0000)
committer
Steven Barth
<cyrus@openwrt.org>
Thu, 1 Jan 2009 13:05:16 +0000
(13:05 +0000)
SVN-Revision: 13791
package/firewall/files/uci_firewall.sh
patch
|
blob
|
history
diff --git
a/package/firewall/files/uci_firewall.sh
b/package/firewall/files/uci_firewall.sh
index 41b2b5f76c399274fb871673c5ad3fd36549358a..93259fc96247213328375e8339814979334f0172 100755
(executable)
--- a/
package/firewall/files/uci_firewall.sh
+++ b/
package/firewall/files/uci_firewall.sh
@@
-217,6
+217,16
@@
fw_rule() {
config_get proto $1 proto
config_get target $1 target
config_get ruleset $1 ruleset
+
+ src_port_first=${src_port%-*}
+ src_port_last=${src_port#*-}
+ [ "$src_port_first" -ne "$src_port_last" ] && { \
+ src_port="$src_port_first:$src_port_last"; }
+
+ dest_port_first=${dest_port%-*}
+ dest_port_last=${dest_port#*-}
+ [ "$dest_port_first" -ne "$dest_port_last" ] && { \
+ dest_port="$dest_port_first:$dest_port_last"; }
ZONE=input
TARGET=$target