zebra: return the proto nhe on del even with refs

Return the proto nhe on del even if their are still possible
route references.

We may get a del before the routes are removed. So we still need
to return this to the caller so they can decrement the ref.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
Stephen Worley 2020-05-24 16:08:36 -04:00
parent 3bccc0f5eb
commit 9c6c48bc10

View File

@ -2838,7 +2838,7 @@ struct nhg_hash_entry *zebra_nhg_proto_del(uint32_t id)
zlog_debug(
"%s: id %u, still being used by routes refcnt %u",
__func__, nhe->id, nhe->refcnt);
return NULL;
return nhe;
}
if (IS_ZEBRA_DEBUG_NHG_DETAIL)