]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: fix redirect handling for TCP packets
authorMichal Kubecek <mkubecek@suse.cz>
Tue, 28 May 2013 06:26:49 +0000 (08:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 May 2013 06:39:19 +0000 (23:39 -0700)
commit6272b6431a6b6051e3800deed572bcbc178d24a3
treeeeca4296492586db73ab13e22da6394203e25b3f
parent1a076d807276ed16c08fef1f447da32606131100
ipv4: fix redirect handling for TCP packets

Unlike ipv4_redirect() and ipv4_sk_redirect(), ip_do_redirect()
doesn't call __build_flow_key() directly but via
ip_rt_build_flow_key() wrapper. This leads to __build_flow_key()
getting pointer to IPv4 header of the ICMP redirect packet
rather than pointer to the embedded IPv4 header of the packet
initiating the redirect.

As a result, handling of ICMP redirects initiated by TCP packets
is broken. Issue was introduced by

529f0ee85 ("ipv4: Add FIB nexthop exceptions.")

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c