]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: fib_rules: Dump rules during registration to FIB chain
authorIdo Schimmel <idosch@mellanox.com>
Thu, 3 Aug 2017 11:28:18 +0000 (13:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Aug 2017 22:36:00 +0000 (15:36 -0700)
commit7c8694c9843a3f8fa31923c0815d356af9d829d6
treefad7aaa2d2aac7cb2db4908987cf0da97e9c25a7
parentc6d8bab516eb61d5ffc65069b5014e3ea6dd3b9a
ipv6: fib_rules: Dump rules during registration to FIB chain

Allow users of the FIB notification chain to receive a complete view of
the IPv6 FIB rules upon registration to the chain.

The integrity of the dump is ensured by a per-family sequence counter
that is incremented (under RTNL) whenever a rule is added or deleted.

All the sequence counters are read (under RTNL) and summed, prior and
after the dump. In case the counters differ, then the dump is either
restarted or the registration fails.

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/ip6_fib.h
net/ipv6/fib6_notifier.c
net/ipv6/fib6_rules.c