diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-06-30 01:36:09 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-06-30 01:36:09 +0000 |
commit | 8f0fb81dfeff3b05f097905064172f7d8f2c9ed6 (patch) | |
tree | 6a6044916eda52f570f943c100605ece57f79f70 | |
parent | 68a1c8e1e3ccd2a366563b32db85361f5fff6cec (diff) | |
download | upstream-8f0fb81dfeff3b05f097905064172f7d8f2c9ed6.tar.gz upstream-8f0fb81dfeff3b05f097905064172f7d8f2c9ed6.tar.bz2 upstream-8f0fb81dfeff3b05f097905064172f7d8f2c9ed6.zip |
firewall: restore local port relocation ability from r26617
SVN-Revision: 27318
-rw-r--r-- | package/firewall/files/lib/core_redirect.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/package/firewall/files/lib/core_redirect.sh b/package/firewall/files/lib/core_redirect.sh index f511d2915e..0b8030d96a 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 \ |