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)
commitc10c4279c778df03f404a4d6906d7d4b840eb95f
treeaa768ad0669898767b41cda125fe165430360339
parent6b722237b656d045c0b9bab9966a5e46604258ba
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