]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Notify newly added route if should be offloaded
authorIdo Schimmel <idosch@mellanox.com>
Mon, 23 Dec 2019 13:28:13 +0000 (15:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Dec 2019 06:37:29 +0000 (22:37 -0800)
commit2c28d955fb90a0a92475413be5bf0f5a9e5273a9
treeaa768ad0669898767b41cda125fe165430360339
parent205ae3ee5c2ea356bcfb200e5133433c8485b4a5
ipv6: Notify newly added route if should be offloaded

fib6_add_rt2node() takes care of adding a single route ('struct
fib6_info') to a FIB node. The route in question should only be notified
in case it is added as the first route in the node (lowest metric) or if
it is added as a sibling route to the first route in the node.

The first criterion can be tested by checking if the route is pointed to
by 'fn->leaf'. The second criterion can be tested by checking the new
'notify_sibling_rt' variable that is set when the route is added as a
sibling to the first route in the node.

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