]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 18:40:53 +0000 (11:40 -0700)
commit018660661b23526bbc9ebcd2dc260453ed1f49d5
treebbc6209d5fb089ba3ed10a6f3f45c7e2f07743bb
parent2ce655e2c1e821c6681bb0001c8a0add874647ec
netfilter: TCP and raw fix for ip_route_me_harder

[ Upstream commit 797fd3913abf2f7036003ab8d3d019cbea41affd ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/netfilter.c