Skip to content

Commit

Permalink
ipv6: Notify route if replacing currently offloaded one
Browse files Browse the repository at this point in the history
Similar to the corresponding IPv4 patch, only notify the new route if it
is replacing the currently offloaded one. Meaning, the one pointed to by
'fn->leaf'.

Signed-off-by: Ido Schimmel <[email protected]>
Reviewed-by: Jiri Pirko <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
idosch authored and davem330 committed Dec 25, 2019
1 parent c10c427 commit 51bf7f3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions net/ipv6/ip6_fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,13 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct fib6_info *rt,
}

if (!info->skip_notify_kernel) {
enum fib_event_type fib_event;

fib_event = FIB_EVENT_ENTRY_REPLACE_TMP;
if (ins == &fn->leaf)
err = call_fib6_entry_notifiers(info->nl_net,
fib_event, rt,
extack);
err = call_fib6_entry_notifiers(info->nl_net,
FIB_EVENT_ENTRY_REPLACE,
rt, extack);
Expand Down

0 comments on commit 51bf7f3

Please sign in to comment.