]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: only uninstall once, when closing rib table 3261/head
authorMark Stapp <mjs@voltanet.io>
Tue, 30 Oct 2018 13:41:55 +0000 (09:41 -0400)
committerMark Stapp <mjs@voltanet.io>
Tue, 30 Oct 2018 13:41:55 +0000 (09:41 -0400)
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 <mjs@voltanet.io>
zebra/zebra_rib.c

index b5d7093525dbb8bb00948eb8c64b30dfb25acbdd..d55467c727f30f5a9704d28f9ede8e5d43bf7e02 100644 (file)
@@ -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;
+                       }
                }
        }
 }