Unify portrange-support in firewall rule generator fixes #4404
SVN-Revision: 13791
This commit is contained in:
parent
35078a6a52
commit
d1049f535a
1 changed files with 10 additions and 0 deletions
|
@ -217,6 +217,16 @@ fw_rule() {
|
||||||
config_get proto $1 proto
|
config_get proto $1 proto
|
||||||
config_get target $1 target
|
config_get target $1 target
|
||||||
config_get ruleset $1 ruleset
|
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
|
ZONE=input
|
||||||
TARGET=$target
|
TARGET=$target
|
||||||
|
|
Loading…
Reference in a new issue