mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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>
This commit is contained in:
parent
d3f706f68e
commit
cacaad11f4
3 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue