Blob Blame History Raw
From: Ido Schimmel <idosch@mellanox.com>
Date: Sat, 14 Dec 2019 17:53:12 +0200
Subject: ipv4: Handle route deletion notification during flush
Patch-mainline: v5.6-rc1
Git-commit: 525bc345fcbc6f0d58977452999dd18a15dc0e9b
References: bsc#1176774

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>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 net/ipv4/fib_trie.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1979,6 +1979,8 @@ int fib_table_flush(struct net *net, str
 				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,