]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ipv4: Handle route deletion notification during flush
authorIdo Schimmel <idosch@mellanox.com>
Sat, 14 Dec 2019 15:53:12 +0000 (17:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Dec 2019 00:14:42 +0000 (16:14 -0800)
In a similar fashion to previous patch, when a route is deleted as part
of table flushing, promote the next route in the list, if exists.
Otherwise, simply emit a delete notification.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_trie.c

index 012aca433a913764505d780440d07b74467808b0..c23be49ca51cb75878ad0d05f9d2b5a444d63974 100644 (file)
@@ -1979,6 +1979,8 @@ int fib_table_flush(struct net *net, struct fib_table *tb, bool flush_all)
                                continue;
                        }
 
+                       fib_notify_alias_delete(net, n->key, &n->leaf, fa,
+                                               NULL);
                        call_fib_entry_notifiers(net, FIB_EVENT_ENTRY_DEL,
                                                 n->key,
                                                 KEYLENGTH - fa->fa_slen, fa,