mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 21:08:26 +02:00
[package] firewall: initialize dest_port with src_dport if omitted in redirect sections to narrow
down corresponding forward rules to the actual target ports - thanks Niels Boehm! (#6249) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18617 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
59008615d8
commit
9cdb777d0c
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=firewall
|
||||
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=8
|
||||
PKG_RELEASE:=9
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
@ -362,7 +362,7 @@ fw_redirect() {
|
||||
[ "$src_dport_first" -ne "$src_dport_last" ] && { \
|
||||
src_dport="$src_dport_first:$src_dport_last"; }
|
||||
|
||||
dest_port2=$dest_port
|
||||
dest_port2=${dest_port:-$src_dport}
|
||||
dest_port_first=${dest_port2%-*}
|
||||
dest_port_last=${dest_port2#*-}
|
||||
[ "$dest_port_first" -ne "$dest_port_last" ] && { \
|
||||
|
Loading…
Reference in New Issue
Block a user