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)

SVN-Revision: 18617
master
Jo-Philipp Wich 15 years ago
parent a263714936
commit 6cb040903b
  1. 2
      package/firewall/Makefile
  2. 2
      package/firewall/files/uci_firewall.sh

@ -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…
Cancel
Save