mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-11 23:50:14 +02:00
Unify portrange-support in firewall rule generator
fixes #4404 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13791 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
afb87b33ca
commit
e1ee5624c2
@ -218,6 +218,16 @@ fw_rule() {
|
|||||||
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
|
||||||
[ -z "$target" ] && target=DROP
|
[ -z "$target" ] && target=DROP
|
||||||
|
Loading…
Reference in New Issue
Block a user