summaryrefslogtreecommitdiff
path: root/include/net/netns
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2016-12-03 18:45:06 +0300
committerDavid S. Miller <davem@davemloft.net>2016-12-04 03:29:35 +0300
commitcacaad11f43aefbbe5fca00af3b9c16e6aee1ba4 (patch)
treeca7600f9e865f6bfef8ce60a9c1d1ddd34acba96 /include/net/netns
parentd3f706f68e2fd93f1172fe7fd6f16ba70cc52b31 (diff)
downloadlinux-cacaad11f43aefbbe5fca00af3b9c16e6aee1ba4.tar.xz
ipv4: fib: Allow for consistent FIB dumping
The next patch will enable listeners of the FIB notification chain to request a dump of the FIB tables. However, since RTNL isn't taken during the dump, it's possible for the FIB tables to change mid-dump, which will result in inconsistency between the listener's table and the kernel's. Allow listeners to know about changes that occurred mid-dump, by adding a change sequence counter to each net namespace. The counter is incremented just before a notification is sent in the FIB chain. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netns')
-rw-r--r--include/net/netns/ipv4.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 7adf4386ac8f..f0cf5a1b777e 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -135,6 +135,9 @@ struct netns_ipv4 {
#ifdef CONFIG_IP_ROUTE_MULTIPATH
int sysctl_fib_multipath_use_neigh;
#endif
+
+ unsigned int fib_seq; /* protected by rtnl_mutex */
+
atomic_t rt_genid;
};
#endif