]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: handle gracefulRS/retain with proto NHGs
authorStephen Worley <sworley@nvidia.com>
Thu, 22 Apr 2021 21:21:12 +0000 (17:21 -0400)
committerStephen Worley <sworley@nvidia.com>
Thu, 22 Apr 2021 21:25:15 +0000 (17:25 -0400)
commitdc65cd999d85bcbd356997a112feecddce441620
tree295db0c361821f9cd13eb2ab7f118bfed3c9f055
parent45691de9a0a806dc67d4304044667f05a8caef09
zebra: handle gracefulRS/retain with proto NHGs

Properly handle refcounting of Proto-owned NHGs when
zebra is operating under graceful restart and retain
conditions.

We have an extra refcnt of 1 we keep for proto-owned NHGs to
indicate the upper level proto has created and owns it.

When we are reading these in from the kernel, we need to set them
to 1 as appropriate. Without this, we fail in the assert() during
zebra_nhg_proto_add() after the owning daemons resends the NHG
and the refcnts are off by one.

Also add in the same logic we use for routes when sweeping with
respect to uptimes.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
zebra/zebra_nhg.c