ipv6: Only Replay routes of interest to new listeners
authorIdo Schimmel <idosch@mellanox.com>
Mon, 23 Dec 2019 13:28:16 +0000 (15:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Dec 2019 06:37:30 +0000 (22:37 -0800)
commit9c6ecd3cf62d0eb57539f966d7ad617ad3a59f4b
treeb29bb3b87a713e1eed3195899b026d7f2bc83008
parent0ee0f47c26b2f909ec95d7d8fed8119e288c4dd3
ipv6: Only Replay routes of interest to new listeners

When a new listener is registered to the FIB notification chain it
receives a dump of all the available routes in the system. Instead, make
sure to only replay the IPv6 routes that are actually used in the data
path and are of any interest to the new listener.

This is done by iterating over all the routing tables in the given
namespace, but from each traversed node only the first route ('leaf') is
notified. Multipath routes are notified in a single notification instead
of one for each nexthop.

Add fib6_rt_dump_tmp() to do that. Later on in the patch set it will be
renamed to fib6_rt_dump() instead of the existing one.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_fib.c