diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-03-08 10:35:38 -0500 | 
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-25 11:13:37 -0400 | 
| commit | 3e0372d20e9880c135a8d7ab880cd4105c0222f1 (patch) | |
| tree | 55898bbc9421b1fccc07bd9b3445a8b16d68c612 /zebra/zebra_router.c | |
| parent | e25f64010ef853728de087ad873e018f34a98382 (diff) | |
zebra: Uninstall nexthops on shutdown
Add functionality to uninstall nexthops we created on shutdown.
To account for this, I added in a function for zebra_router
cleanup in a shutdown event.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_router.c')
| -rw-r--r-- | zebra/zebra_router.c | 11 | 
1 files changed, 11 insertions, 0 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c index 408fc16dd1..b85319df73 100644 --- a/zebra/zebra_router.c +++ b/zebra/zebra_router.c @@ -266,3 +266,14 @@ void zebra_router_init(void)  		hash_create_size(8, zebra_nhg_id_key, zebra_nhg_hash_id_equal,  				 "Zebra Router Nexthop Groups ID index");  } + +/** + * zebra_router_cleanup() - Perform any cleanup actions before termination + * + * Right now this is just being used to clear the nexthops we installed in + * the kernel on shutdown before the routes are cleaned via vrf_terminated(). + */ +void zebra_router_cleanup(void) +{ +	zebra_nhg_cleanup_tables(); +}  | 
