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>
This commit is contained in:

committed by
David S. Miller

parent
16ab6d7d4d
commit
df77fe4d98
@@ -258,6 +258,11 @@ typedef struct rt6_info *(*pol_lookup_t)(struct net *,
|
||||
struct fib6_table *,
|
||||
struct flowi6 *, int);
|
||||
|
||||
struct fib6_entry_notifier_info {
|
||||
struct fib_notifier_info info; /* must be first */
|
||||
struct rt6_info *rt;
|
||||
};
|
||||
|
||||
/*
|
||||
* exported functions
|
||||
*/
|
||||
|
Reference in New Issue
Block a user