summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_router.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-08-01 20:07:04 +0200
committerStephen Worley <sworley@cumulusnetworks.com>2019-10-25 17:13:41 +0200
commit38e40db1c9695786d41a85661e313ce5a207866f (patch)
tree16e6399ae8cdc01a20bff437db782689ad94b786 /zebra/zebra_router.c
parentzebra: Give installed nhe's the zebra proto (diff)
downloadfrr-38e40db1c9695786d41a85661e313ce5a207866f.tar.xz
frr-38e40db1c9695786d41a85661e313ce5a207866f.zip
zebra: Sweep our nexthop objects out on restart
On restart, if we failed to remove any nexthop objects due to a kill -9 or such event, sweep them if we aren't using them. Add a proto field to handle this and remove the is_kernel bool. Add a dupicate flag that indicates this nexthop group is only present in our ID hashtable. It is a dupicate nexthop we received from the kernel, therefore we cannot hash on it. Make the idcounter globally accessible so that kernel updates increment it as soon as we receive them, not when we handle them. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_router.c')
-rw-r--r--zebra/zebra_router.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c
index b85319df7..d6ec6ac16 100644
--- a/zebra/zebra_router.c
+++ b/zebra/zebra_router.c
@@ -154,6 +154,11 @@ void zebra_router_sweep_route(void)
}
}
+void zebra_router_sweep_nhgs(void)
+{
+ zebra_nhg_sweep_table(zrouter.nhgs_id);
+}
+
static void zebra_router_free_table(struct zebra_router_table *zrt)
{
void *table_info;
@@ -275,5 +280,5 @@ void zebra_router_init(void)
*/
void zebra_router_cleanup(void)
{
- zebra_nhg_cleanup_tables();
+ zebra_nhg_cleanup_tables(zrouter.nhgs_id);
}