1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-23 23:16:16 +02:00

[package] firewall: restore local port relocation ability from r26617

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27318 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2011-06-30 01:36:09 +00:00
parent 87281df903
commit e21fd93d0f

View File

@ -34,7 +34,7 @@ fw_load_redirect() {
return 0 return 0
} }
fwdchain="zone_${redirect_src}_forward" fwdchain="zone_${redirect_src}${redirect_dest_ip:+_forward}"
natopt="--to-destination" natopt="--to-destination"
natchain="zone_${redirect_src}_prerouting" natchain="zone_${redirect_src}_prerouting"
@ -104,10 +104,10 @@ fw_load_redirect() {
$redirect_options \ $redirect_options \
} }
[ -n "$destaddr" ] && \
fw add $mode f ${fwdchain:-forward} ACCEPT + \ fw add $mode f ${fwdchain:-forward} ACCEPT + \
{ $redirect_src_ip $redirect_dest_ip } { \ { $redirect_src_ip $redirect_dest_ip } { \
$srcaddr $destaddr $redirect_proto \ $srcaddr ${destaddr:--m conntrack --ctstate DNAT} \
$redirect_proto \
$srcports $destports \ $srcports $destports \
$redirect_src_mac \ $redirect_src_mac \
$redirect_extra \ $redirect_extra \