summaryrefslogtreecommitdiff
path: root/zebra/zebra_nhg.h
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2020-05-20 15:47:12 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2020-09-28 12:40:59 -0400
commit1f655680469dc883298348b2bdd4c2ae8bff0fe7 (patch)
treeea11c306b4a1b3a1d9642315c58095c7bc2cd4f3 /zebra/zebra_nhg.h
parent68671c74390fdb746568413e6d2150cae4c2d4b9 (diff)
zebra: fix refcnt/rib issues in NHG replace/delete
Fix some reference counting issues seen when replacing a NHG and deleting one. For replacement, we should end with the same refcnt on the new one. For delete, its the caller's job to decrement its ref after its done with it. Further, update routes in the rib with the new pointer after replace. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_nhg.h')
-rw-r--r--zebra/zebra_nhg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_nhg.h b/zebra/zebra_nhg.h
index 8c33a91917..6c9f20d0a4 100644
--- a/zebra/zebra_nhg.h
+++ b/zebra/zebra_nhg.h
@@ -281,7 +281,7 @@ struct nhg_hash_entry *zebra_nhg_proto_add(uint32_t id, int type,
*
* Returns deleted NHE on success, otherwise NULL.
*
- * Caller must free the NHE.
+ * Caller must decrement ref with zebra_nhg_decrement_ref() when done.
*/
struct nhg_hash_entry *zebra_nhg_proto_del(uint32_t id);