]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: When saving nhg for later stop processing
authorDonald Sharp <sharpd@nvidia.com>
Tue, 2 Aug 2022 19:43:46 +0000 (15:43 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 5 Aug 2022 11:51:27 +0000 (07:51 -0400)
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 <sharpd@nvidia.com>
zebra/zebra_nhg.c

index f846164834423bb6f0ae1862efe694515b668192..bd793ed5dd1a3a6486fa0c9b8837ca7d01de1f76 100644 (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))