From 728a112df68727ba8569cd72fc4aa9255a48c8f1 Mon Sep 17 00:00:00 2001 From: dgsudharsan Date: Thu, 20 Feb 2025 02:02:37 +0000 Subject: [PATCH] [FRR]Fixing route update on duplicate link up event in promiscuous mode --- ...-if-event-evaluate-bnc-with-matching.patch | 78 +++++++++++++++++++ src/sonic-frr/patch/series | 1 + 2 files changed, 79 insertions(+) create mode 100644 src/sonic-frr/patch/0082-Revert-bgpd-upon-if-event-evaluate-bnc-with-matching.patch diff --git a/src/sonic-frr/patch/0082-Revert-bgpd-upon-if-event-evaluate-bnc-with-matching.patch b/src/sonic-frr/patch/0082-Revert-bgpd-upon-if-event-evaluate-bnc-with-matching.patch new file mode 100644 index 000000000000..3af2f3be74df --- /dev/null +++ b/src/sonic-frr/patch/0082-Revert-bgpd-upon-if-event-evaluate-bnc-with-matching.patch @@ -0,0 +1,78 @@ +From 086c32eb5bf2ebfb4805f76219c1a3bc5dd9213e Mon Sep 17 00:00:00 2001 +From: dgsudharsan +Date: Wed, 19 Feb 2025 17:24:39 +0000 +Subject: [PATCH] Revert "bgpd: upon if event, evaluate bnc with matching + nexthop" + +This reverts commit 58592be57783a3b24e7351af2a5afc61299768df. + +diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c +index 196cc00385..78eb1a9183 100644 +--- a/bgpd/bgp_nht.c ++++ b/bgpd/bgp_nht.c +@@ -751,10 +751,6 @@ static void bgp_nht_ifp_table_handle(struct bgp *bgp, + struct interface *ifp, bool up) + { + struct bgp_nexthop_cache *bnc; +- struct nexthop *nhop; +- uint16_t other_nh_count; +- bool nhop_ll_found = false; +- bool nhop_found = false; + + if (ifp->ifindex == IFINDEX_INTERNAL) { + zlog_warn("%s: The interface %s ignored", __func__, ifp->name); +@@ -762,42 +758,9 @@ static void bgp_nht_ifp_table_handle(struct bgp *bgp, + } + + frr_each (bgp_nexthop_cache, table, bnc) { +- other_nh_count = 0; +- nhop_ll_found = bnc->ifindex_ipv6_ll == ifp->ifindex; +- for (nhop = bnc->nexthop; nhop; nhop = nhop->next) { +- if (nhop->ifindex == bnc->ifindex_ipv6_ll) +- continue; +- +- if (nhop->ifindex != ifp->ifindex) { +- other_nh_count++; +- continue; +- } +- if (nhop->vrf_id != ifp->vrf->vrf_id) { +- other_nh_count++; +- continue; +- } +- nhop_found = true; +- } +- +- if (!nhop_found && !nhop_ll_found) +- /* The event interface does not match the nexthop cache +- * entry */ +- continue; +- +- if (!up && other_nh_count > 0) +- /* Down event ignored in case of multiple next-hop +- * interfaces. The other might interfaces might be still +- * up. The cases where all interfaces are down or a bnc +- * is invalid are processed by a separate zebra rnh +- * messages. +- */ ++ if (bnc->ifindex_ipv6_ll != ifp->ifindex) + continue; + +- if (!nhop_ll_found) { +- evaluate_paths(bnc); +- continue; +- } +- + bnc->last_update = monotime(NULL); + bnc->change_flags = 0; + +@@ -810,7 +773,6 @@ static void bgp_nht_ifp_table_handle(struct bgp *bgp, + if (up) { + SET_FLAG(bnc->flags, BGP_NEXTHOP_VALID); + SET_FLAG(bnc->change_flags, BGP_NEXTHOP_CHANGED); +- /* change nexthop number only for ll */ + bnc->nexthop_num = 1; + } else { + UNSET_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED); +-- +2.43.2 + diff --git a/src/sonic-frr/patch/series b/src/sonic-frr/patch/series index 427df08d8af4..72529f1cb0df 100644 --- a/src/sonic-frr/patch/series +++ b/src/sonic-frr/patch/series @@ -61,3 +61,4 @@ 0078-vtysh-de-conditionalize-and-reorder-install-node.patch 0079-staticd-add-support-for-srv6.patch 0080-SRv6-vpn-route-and-sidlist-install.patch +0082-Revert-bgpd-upon-if-event-evaluate-bnc-with-matching.patch