From 258c07e4e2a42deea514606357930a15527de7c6 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Tue, 30 Oct 2018 09:41:55 -0400 Subject: [PATCH] zebra: only uninstall once, when closing rib table When the rib code is informed that a table is closing/ going away, only try once to uninstall associated routes from the fib/dataplane. The close path can be called multiple times in some cases - zebra shutdown, e.g. Signed-off-by: Mark Stapp --- zebra/zebra_rib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index b5d7093525..d55467c727 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -3246,8 +3246,10 @@ void rib_close_table(struct route_table *table) if (info->safi == SAFI_UNICAST) hook_call(rib_update, rn, NULL); - if (!RIB_SYSTEM_ROUTE(dest->selected_fib)) + if (!RIB_SYSTEM_ROUTE(dest->selected_fib)) { rib_uninstall_kernel(rn, dest->selected_fib); + dest->selected_fib = NULL; + } } } } -- 2.39.5