]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: fib: Add in-kernel notifications for route add / delete
authorIdo Schimmel <idosch@mellanox.com>
Thu, 3 Aug 2017 11:28:17 +0000 (13:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Aug 2017 22:36:00 +0000 (15:36 -0700)
commit91ed3f358d0669083659e98e43867868b10dcd9c
tree8a4f9eeb5ac38c657d291e99a698eb7876a94c26
parented4949f43515d67df585fce3de12e07d0e309714
ipv6: fib: Add in-kernel notifications for route add / delete

As with IPv4, allow listeners of the FIB notification chain to receive
notifications whenever a route is added, replaced or deleted. This is
done by placing calls to the FIB notification chain in the two lowest
level functions that end up performing these operations - namely,
fib6_add_rt2node() and fib6_del_route().

Unlike IPv4, APPEND notifications aren't sent as the kernel doesn't
distinguish between "append" (NLM_F_CREATE|NLM_F_APPEND) and "prepend"
(NLM_F_CREATE). If NLM_F_EXCL isn't set, duplicate routes are always
added after the existing duplicate routes.

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/ip6_fib.c