summaryrefslogtreecommitdiff
path: root/zebra/main.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-10-22 08:02:33 -0400
committerDonald Sharp <sharpd@nvidia.com>2020-10-22 08:02:33 -0400
commitb1b07ef5a690d5da78b549ede282ff479c98169d (patch)
treec19f2858bea20489da857fad69581c344f9704a3 /zebra/main.c
parent3506f3f9077581de184c28220274a7afcf150506 (diff)
zebra: Do not delete nhg's when retain_mode is engaged
When `-r` is specified to zebra, on shutdown we should not remove any routes from the fib. This was a problem with nhg's on shutdown due to their ref-count behavior. Introduce a methodology where on shutdown we don't mess with the nexthop groups in the kernel. That way on next startup things will be ok. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/main.c')
-rw-r--r--zebra/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/zebra/main.c b/zebra/main.c
index 6b6409f845..ced29e1a25 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -170,12 +170,14 @@ static void sigint(void)
zebra_ptm_finish();
- if (retain_mode)
+ if (retain_mode) {
+ zebra_nhg_mark_keep();
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
zvrf = vrf->info;
if (zvrf)
SET_FLAG(zvrf->flags, ZEBRA_VRF_RETAIN);
}
+ }
if (zrouter.lsp_process_q)
work_queue_free_and_null(&zrouter.lsp_process_q);