]> git.baikalelectronics.ru Git - kernel.git/commit
[NETFILTER]: Fix outgoing redirects to loopback
authorPatrick McHardy <kaber@trash.net>
Mon, 20 Feb 2006 06:29:47 +0000 (22:29 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Feb 2006 06:29:47 +0000 (22:29 -0800)
commit555b6ad2b4b2c4eb1dc8c02ea84c8da0f7f0bc22
treee0113097593dd2b805310bf525b0d2a6823f0a06
parent8718f602f74f2214da099cc5a897975dc6365cae
[NETFILTER]: Fix outgoing redirects to loopback

When redirecting an outgoing packet to loopback, it keeps the original
conntrack reference and information from the outgoing path, which
falsely triggers the check for DNAT on input and the dst_entry is
released to trigger rerouting. ip_route_input refuses to route the
packet because it has a local source address and it is dropped.

Look at the packet itself to dermine if it was NATed. Also fix a
missing inversion that causes unneccesary xfrm lookups.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ip_nat_standalone.c