|
| 1 | +From 086c32eb5bf2ebfb4805f76219c1a3bc5dd9213e Mon Sep 17 00:00:00 2001 |
| 2 | +From: dgsudharsan <sudharsand@nvidia.com> |
| 3 | +Date: Wed, 19 Feb 2025 17:24:39 +0000 |
| 4 | +Subject: [PATCH] Revert "bgpd: upon if event, evaluate bnc with matching |
| 5 | + nexthop" |
| 6 | + |
| 7 | +This reverts commit 58592be57783a3b24e7351af2a5afc61299768df. |
| 8 | + |
| 9 | +diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c |
| 10 | +index 196cc00385..78eb1a9183 100644 |
| 11 | +--- a/bgpd/bgp_nht.c |
| 12 | ++++ b/bgpd/bgp_nht.c |
| 13 | +@@ -751,10 +751,6 @@ static void bgp_nht_ifp_table_handle(struct bgp *bgp, |
| 14 | + struct interface *ifp, bool up) |
| 15 | + { |
| 16 | + struct bgp_nexthop_cache *bnc; |
| 17 | +- struct nexthop *nhop; |
| 18 | +- uint16_t other_nh_count; |
| 19 | +- bool nhop_ll_found = false; |
| 20 | +- bool nhop_found = false; |
| 21 | + |
| 22 | + if (ifp->ifindex == IFINDEX_INTERNAL) { |
| 23 | + zlog_warn("%s: The interface %s ignored", __func__, ifp->name); |
| 24 | +@@ -762,42 +758,9 @@ static void bgp_nht_ifp_table_handle(struct bgp *bgp, |
| 25 | + } |
| 26 | + |
| 27 | + frr_each (bgp_nexthop_cache, table, bnc) { |
| 28 | +- other_nh_count = 0; |
| 29 | +- nhop_ll_found = bnc->ifindex_ipv6_ll == ifp->ifindex; |
| 30 | +- for (nhop = bnc->nexthop; nhop; nhop = nhop->next) { |
| 31 | +- if (nhop->ifindex == bnc->ifindex_ipv6_ll) |
| 32 | +- continue; |
| 33 | +- |
| 34 | +- if (nhop->ifindex != ifp->ifindex) { |
| 35 | +- other_nh_count++; |
| 36 | +- continue; |
| 37 | +- } |
| 38 | +- if (nhop->vrf_id != ifp->vrf->vrf_id) { |
| 39 | +- other_nh_count++; |
| 40 | +- continue; |
| 41 | +- } |
| 42 | +- nhop_found = true; |
| 43 | +- } |
| 44 | +- |
| 45 | +- if (!nhop_found && !nhop_ll_found) |
| 46 | +- /* The event interface does not match the nexthop cache |
| 47 | +- * entry */ |
| 48 | +- continue; |
| 49 | +- |
| 50 | +- if (!up && other_nh_count > 0) |
| 51 | +- /* Down event ignored in case of multiple next-hop |
| 52 | +- * interfaces. The other might interfaces might be still |
| 53 | +- * up. The cases where all interfaces are down or a bnc |
| 54 | +- * is invalid are processed by a separate zebra rnh |
| 55 | +- * messages. |
| 56 | +- */ |
| 57 | ++ if (bnc->ifindex_ipv6_ll != ifp->ifindex) |
| 58 | + continue; |
| 59 | + |
| 60 | +- if (!nhop_ll_found) { |
| 61 | +- evaluate_paths(bnc); |
| 62 | +- continue; |
| 63 | +- } |
| 64 | +- |
| 65 | + bnc->last_update = monotime(NULL); |
| 66 | + bnc->change_flags = 0; |
| 67 | + |
| 68 | +@@ -810,7 +773,6 @@ static void bgp_nht_ifp_table_handle(struct bgp *bgp, |
| 69 | + if (up) { |
| 70 | + SET_FLAG(bnc->flags, BGP_NEXTHOP_VALID); |
| 71 | + SET_FLAG(bnc->change_flags, BGP_NEXTHOP_CHANGED); |
| 72 | +- /* change nexthop number only for ll */ |
| 73 | + bnc->nexthop_num = 1; |
| 74 | + } else { |
| 75 | + UNSET_FLAG(bnc->flags, BGP_NEXTHOP_PEER_NOTIFIED); |
| 76 | +-- |
| 77 | +2.43.2 |
| 78 | + |
0 commit comments