]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: fib: Allow for consistent FIB dumping
authorIdo Schimmel <idosch@mellanox.com>
Sat, 3 Dec 2016 15:45:06 +0000 (16:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Dec 2016 00:29:35 +0000 (19:29 -0500)
commit7ebd2c3f76ae8afd4de03e6e752698c4cbb0c6ea
treeca7600f9e865f6bfef8ce60a9c1d1ddd34acba96
parentf522122d4a8e774ec3fa7d4995da3b4d08c68053
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>
include/net/netns/ipv4.h
net/ipv4/fib_frontend.c
net/ipv4/fib_trie.c