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 <sworley@cumulusnetworks.com>
This commit is contained in:
Stephen Worley 2020-05-10 16:34:36 -04:00
parent 6c67f41f9e
commit 08da8bbc22

View File

@ -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.
*