]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: TCP and raw fix for ip_route_me_harder
authorJulian Anastasov <ja@ssi.bg>
Sun, 7 Aug 2011 09:11:00 +0000 (09:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Aug 2011 05:52:32 +0000 (22:52 -0700)
commit5a156489308b7ae3372a2988ccdb8d440316c2eb
treea2e6aee9a92754f11f33bab4e8f9deed3ffb94bf
parentaba0f487c384ab36c18ddfd186a94ca0a5ab10bd
netfilter: TCP and raw fix for ip_route_me_harder

TCP in some cases uses different global (raw) socket
to send RST and ACK. The transparent flag is not set there.
Currently, it is a problem for rerouting after the previous
change.

Fix it by simplifying the checks in ip_route_me_harder
and use FLOWI_FLAG_ANYSRC even for sockets. It looks safe
because the initial routing allowed this source address to
be used and now we just have to make sure the packet is rerouted.

As a side effect this also allows rerouting for normal
raw sockets that use spoofed source addresses which was not possible
even before we eliminated the ip_route_input call.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter.c