From 08da8bbc22f38a352bed729b041abc9bdc3eec6e Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Sun, 10 May 2020 16:34:36 -0400 Subject: [PATCH] zebra: hash proto-created but zebra ID spaced NHGS To prevent duplication of singleton NHGs, lets hash any zebra-ID spaced NHGs sent from an upper level proto. These would be singleton NHGs anyway and should prevent duplication of dataplane installs. Signed-off-by: Stephen Worley --- zebra/zebra_nhg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index dbf5adafe1..e5fa7b425a 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -676,7 +676,7 @@ static bool zebra_nhe_find(struct nhg_hash_entry **nhe, /* return value */ if (lookup->id == 0) lookup->id = ++id_counter; - if (ZEBRA_OWNED(lookup)) { + if (lookup->id < zclient_get_nhg_lower_bound()) { /* * This is a zebra hashed/owned NHG. *