From d00a5f6b8b8d11fb903ee04a80a7fcbf0b44f328 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 27 May 2022 11:16:47 -0400 Subject: [PATCH] bgpd: Fix SR color nexthop processing in BGP Commit: 9f002fa5dd34e7d901b501e7d0306027d85b531a Accidently broke the handling of SR color for nexthops in BGP. Put it back Fixes: #11237 Signed-off-by: Donald Sharp --- bgpd/bgp_nht.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index 3433e1471..3ab67a618 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -720,9 +720,8 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id) zlog_debug( "parse nexthop update(%pFX(%u)(%s)): bnc info not found for import check", &nhr.prefix, nhr.srte_color, bgp->name_pretty); - return; - } - bgp_process_nexthop_update(bnc_import, &nhr, true); + } else + bgp_process_nexthop_update(bnc_import, &nhr, true); /* * HACK: if any BGP route is dependant on an SR-policy that doesn't @@ -740,9 +739,9 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id) frr_each (bgp_nexthop_cache, &bgp->nexthop_cache_table[afi], bnc_iter) { - if (!prefix_same(&bnc_import->prefix, &bnc_iter->prefix) - || bnc_iter->srte_color == 0 - || CHECK_FLAG(bnc_iter->flags, BGP_NEXTHOP_VALID)) + if (!prefix_same(&bnc_nhc->prefix, &bnc_iter->prefix) || + bnc_iter->srte_color == 0 || + CHECK_FLAG(bnc_iter->flags, BGP_NEXTHOP_VALID)) continue; bgp_process_nexthop_update(bnc_iter, &nhr, false); -- 2.39.5