zebra: When saving nhg for later stop processing

Commit 35729f38fa 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 <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2022-08-02 15:43:46 -04:00
parent b993483876
commit 34a67a7d1e

View File

@ -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))