]> 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)
commit5366946f82f207ec811ce610f1dd1f752ae52462
treea2e6aee9a92754f11f33bab4e8f9deed3ffb94bf
parent6ef764bd3c738c5a56510d10f6d2793621cfb88e
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