]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit453a6e1384a2a9e19fcf08a0c604e89ffafa3da0
treeb29bb3b87a713e1eed3195899b026d7f2bc83008
parentde258adc3a8ba0ae5d1e10ac62561581f6a40ad0
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