1
0
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:
jow 2009-12-01 22:31:10 +00:00
parent 59008615d8
commit 9cdb777d0c
2 changed files with 22 additions and 22 deletions

View File

@ -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

View File

@ -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" ] && { \