From 34a67a7d1eb1dff6cef5caf8aa85763cc98c31fb Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 2 Aug 2022 15:43:46 -0400 Subject: [PATCH] zebra: When saving nhg for later stop processing Commit 35729f38fa5713b introduced the idea of holding a nexthop group for a small amount of time before removing it from the system. When this code was introduced the nexthop group entry was saved and a timer started, except instead of stopping processing at that point in time, zebra was continuing on and deleting nexthop group entries that that entry depended on as well. This should not be done until the timer pops. Fixes: #11596 Signed-off-by: Donald Sharp --- zebra/zebra_nhg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index f846164834..bd793ed5dd 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1653,6 +1653,7 @@ void zebra_nhg_decrement_ref(struct nhg_hash_entry *nhe) SET_FLAG(nhe->flags, NEXTHOP_GROUP_KEEP_AROUND); thread_add_timer(zrouter.master, zebra_nhg_timer, nhe, zrouter.nhg_keep, &nhe->timer); + return; } if (!zebra_nhg_depends_is_empty(nhe))