From: Stephen Worley Date: Sun, 10 May 2020 20:34:36 +0000 (-0400) Subject: zebra: hash proto-created but zebra ID spaced NHGS X-Git-Tag: base_7.6~489^2~47 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=08da8bbc22f38a352bed729b041abc9bdc3eec6e;p=mirror%2Ffrr.git 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 --- 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. *