]> 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)
commit568c488a7478dcf811545d7e7b2cb70233245f51
treefad7aaa2d2aac7cb2db4908987cf0da97e9c25a7
parent91ed3f358d0669083659e98e43867868b10dcd9c
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