Skip to content

Commit 42d5aa7

Browse files
idoschdavem330
authored andcommitted
ipv4: fib: Send deletion notification with actual FIB alias type
When a FIB alias is removed, a notification is sent using the type passed from user space - can be RTN_UNSPEC - instead of the actual type of the removed alias. This is problematic for listeners of the FIB notification chain, as several FIB aliases can exist with matching parameters, but the type. Solve this by passing the actual type of the removed FIB alias. Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> CC: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 58e3bdd commit 42d5aa7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv4/fib_trie.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,8 +1653,8 @@ int fib_table_delete(struct net *net, struct fib_table *tb,
16531653
return -ESRCH;
16541654

16551655
call_fib_entry_notifiers(net, FIB_EVENT_ENTRY_DEL, key, plen,
1656-
fa_to_delete->fa_info, tos, cfg->fc_type,
1657-
tb->tb_id, 0);
1656+
fa_to_delete->fa_info, tos,
1657+
fa_to_delete->fa_type, tb->tb_id, 0);
16581658
rtmsg_fib(RTM_DELROUTE, htonl(key), fa_to_delete, plen, tb->tb_id,
16591659
&cfg->fc_nlinfo, 0);
16601660

0 commit comments

Comments
 (0)