From e21fd93d0f2a143918f898552e80a49b5b2f8d50 Mon Sep 17 00:00:00 2001 From: jow Date: Thu, 30 Jun 2011 01:36:09 +0000 Subject: [package] firewall: restore local port relocation ability from r26617 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27318 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/firewall/files/lib/core_redirect.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'package') diff --git a/package/firewall/files/lib/core_redirect.sh b/package/firewall/files/lib/core_redirect.sh index f511d2915..0b8030d96 100644 --- a/package/firewall/files/lib/core_redirect.sh +++ b/package/firewall/files/lib/core_redirect.sh @@ -34,7 +34,7 @@ fw_load_redirect() { return 0 } - fwdchain="zone_${redirect_src}_forward" + fwdchain="zone_${redirect_src}${redirect_dest_ip:+_forward}" natopt="--to-destination" natchain="zone_${redirect_src}_prerouting" @@ -104,10 +104,10 @@ fw_load_redirect() { $redirect_options \ } - [ -n "$destaddr" ] && \ fw add $mode f ${fwdchain:-forward} ACCEPT + \ { $redirect_src_ip $redirect_dest_ip } { \ - $srcaddr $destaddr $redirect_proto \ + $srcaddr ${destaddr:--m conntrack --ctstate DNAT} \ + $redirect_proto \ $srcports $destports \ $redirect_src_mac \ $redirect_extra \ -- cgit v1.2.3