]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: dont update counter if outside of zebra ID range
authorStephen Worley <sworley@cumulusnetworks.com>
Sun, 10 May 2020 21:34:35 +0000 (17:34 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Mon, 28 Sep 2020 16:40:59 +0000 (12:40 -0400)
When we receive a NHG from the kernel, we set the ID counter
to that to avoid using IDs owned from the kernel.

If we get one outside of zebra's range, lets not update it
since its probably one we created and never deleted anyway.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
zebra/zebra_nhg.c

index 617a3def6203e543e10cfa6511cda5d415facfcb..74551e31c4d5cc034f9ad8c9f5e7f267e7074855 100644 (file)
@@ -1246,7 +1246,7 @@ int zebra_nhg_kernel_find(uint32_t id, struct nexthop *nh, struct nh_grp *grp,
                zlog_debug("%s: nh %pNHv, id %u, count %d",
                           __func__, nh, id, (int)count);
 
-       if (id > id_counter)
+       if (id > id_counter && id < zclient_get_nhg_lower_bound())
                /* Increase our counter so we don't try to create
                 * an ID that already exists
                 */