]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv4: Invalidate the socket cached route on pmtu events if possible
authorSteffen Klassert <steffen.klassert@secunet.com>
Mon, 21 Jan 2013 01:59:11 +0000 (01:59 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Feb 2013 18:48:31 +0000 (10:48 -0800)
commit1f35a1715c629c1756bf47a6166ead2754ed6d1d
tree1ca4a58f73da89552ebd2396e425378f3495e46f
parentc88be877a5955ba10e7bd35c8be9dddeef84b116
ipv4: Invalidate the socket cached route on pmtu events if possible

[ Upstream commit 9cb3a50c5f63ed745702972f66eaee8767659acd ]

The route lookup in ipv4_sk_update_pmtu() might return a route
different from the route we cached at the socket. This is because
standart routes are per cpu, so each cpu has it's own struct rtable.
This means that we do not invalidate the socket cached route if the
NET_RX_SOFTIRQ is not served by the same cpu that the sending socket
uses. As a result, the cached route reused until we disconnect.

With this patch we invalidate the socket cached route if possible.
If the socket is owened by the user, we can't update the cached
route directly. A followup patch will implement socket release
callback functions for datagram sockets to handle this case.

Reported-by: Yurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/route.c