]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: hash proto-created but zebra ID spaced NHGS
authorStephen Worley <sworley@cumulusnetworks.com>
Sun, 10 May 2020 20:34:36 +0000 (16:34 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Mon, 28 Sep 2020 16:40:59 +0000 (12:40 -0400)
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>
zebra/zebra_nhg.c

index dbf5adafe13ce9a1723a5dfecf1961af0de8bbc5..e5fa7b425aa5009f656ae2278fb23fce955e144d 100644 (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.
                 *