aboutsummaryrefslogtreecommitdiffstats
path: root/package/firewall/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-06-30 01:36:09 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-06-30 01:36:09 +0000
commit3628ff05e48d60fad1ee5e2ff9113b8846b3e0f8 (patch)
tree1cfd0315ec3f02922c2ba23d9110d89f1d6148dc /package/firewall/files
parent534feb8c9b68db0efcf9e713e90e44e7778bb228 (diff)
downloadmaster-187ad058-3628ff05e48d60fad1ee5e2ff9113b8846b3e0f8.tar.gz
master-187ad058-3628ff05e48d60fad1ee5e2ff9113b8846b3e0f8.tar.bz2
master-187ad058-3628ff05e48d60fad1ee5e2ff9113b8846b3e0f8.zip
[package] firewall: restore local port relocation ability from r26617
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27318 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/firewall/files')
-rw-r--r--package/firewall/files/lib/core_redirect.sh6
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 \