]> git.puffer.fish Git - mirror/frr.git/commit
zebra: Uninstall NHG in some situations 17814/head
authorDonald Sharp <sharpd@nvidia.com>
Thu, 9 Jan 2025 20:26:46 +0000 (15:26 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 10 Jan 2025 14:35:35 +0000 (09:35 -0500)
commit4c166947a8bf979ad12826f547fea4dad6933a6e
treeb6d944d66390da49aabb0dfedaa2791d07b1b692
parentb4d640fc3803f5b049579449582c80ebe0e42115
zebra: Uninstall NHG in some situations

If you have this series of events:

a) Decision to install a NHG is made in zebra, enqueue to DPLANE
b) Changes to NHG are made and we remove it in the master pthread
   Since this NHG is not marked as installed it is not removed
   but the NHG data structure is deleted
c) DPLANE installs the NHG

In the end the NHG stays installed but ZEBRA has lost track of it.

Modify the removal code to check to see if the NHG is queued.
There are 2 cases:

a) NHG is kept around for a bit before being deleted.  In this case
just see that the NHG is Queued and keep it around too.

b) NHG is not kept around and we are just removing it.  In this case
check to see if it is queued and send another deletion event.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/zebra_nhg.c