]> git.baikalelectronics.ru Git - kernel.git/commit
inet: add a redirect generation id in inetpeer
authorEric Dumazet <eric.dumazet@gmail.com>
Sat, 26 Nov 2011 12:13:44 +0000 (12:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Nov 2011 00:16:37 +0000 (19:16 -0500)
commit28faf7a04f96798d74b28904f865544bbc5a3e82
tree9a31e87c6e0504627df25d3a1d39ca7825dcd779
parent68c46e074fcdf9bf59b9da13276c140fd0d2bb81
inet: add a redirect generation id in inetpeer

Now inetpeer is the place where we cache redirect information for ipv4
destinations, we must be able to invalidate informations when a route is
added/removed on host.

As inetpeer is not yet namespace aware, this patch adds a shared
redirect_genid, and a per inetpeer redirect_genid. This might be changed
later if inetpeer becomes ns aware.

Cache information for one inerpeer is valid as long as its
redirect_genid has the same value than global redirect_genid.

Reported-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
Tested-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inetpeer.h
net/ipv4/route.c