From: Mark Stapp Date: Mon, 27 Jan 2025 19:17:24 +0000 (-0500) Subject: zebra: include resolving nexthops in nhg hash X-Git-Tag: docker/10.2.2~27^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=0f1e9bb79d9a69d7b070c34c134b0b513c746346;p=matthieu%2Ffrr.git zebra: include resolving nexthops in nhg hash Ensure that the nhg hash comparison function includes all nexthops, including recursive-resolving nexthops. Signed-off-by: Mark Stapp (cherry picked from commit cb7cf73992847cfd4af796085bf14f2fdc4fa8db) --- diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index d1237ec7f8..252b0ce7c7 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -572,8 +572,7 @@ bool zebra_nhg_hash_equal(const void *arg1, const void *arg2) /* Nexthops should be in-order, so we simply compare them in-place */ for (nexthop1 = nhe1->nhg.nexthop, nexthop2 = nhe2->nhg.nexthop; nexthop1 && nexthop2; - nexthop1 = nexthop1->next, nexthop2 = nexthop2->next) { - + nexthop1 = nexthop_next(nexthop1), nexthop2 = nexthop_next(nexthop2)) { if (!nhg_compare_nexthops(nexthop1, nexthop2)) return false; } @@ -608,8 +607,7 @@ bool zebra_nhg_hash_equal(const void *arg1, const void *arg2) for (nexthop1 = nhe1->backup_info->nhe->nhg.nexthop, nexthop2 = nhe2->backup_info->nhe->nhg.nexthop; nexthop1 && nexthop2; - nexthop1 = nexthop1->next, nexthop2 = nexthop2->next) { - + nexthop1 = nexthop_next(nexthop1), nexthop2 = nexthop_next(nexthop2)) { if (!nhg_compare_nexthops(nexthop1, nexthop2)) return false; }