diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2025-02-20 14:28:15 -0500 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2025-02-21 23:12:20 +0000 |
| commit | d9712eb382f6738f9d03791c4be66f9d4201cce3 (patch) | |
| tree | ba04ac4db26d66a73ffaaaf65c40aec754cd5f04 | |
| parent | 24dbcbb31ee5edd79c0ed309e728d6758b8b0e76 (diff) | |
bgpd: remove dmed check not required in bestpath selection
As part of the upstream master commit (f3575f61c7 bgpd: Sort the
bgp_path_inf) the snippet of the code for dmed check condition
left out, which leads to an issue of selecting incorrect bestpath.
As an example:
During the bestpath selection local route looses to another path due
to dmed condition being hit.
The snippet of the logs:
2025/02/20 03:06:20.131441 BGP: [JW7VP-K1YVV]
[2]:[0]:[48]:[00:92:00:00:00:10](VRF default): Comparing path
27.0.0.7 flags Valid with path Static announcement flags Selected Valid Attr Changed Unsorted
2025/02/20 03:06:20.131445 BGP: [SYTDR-QV6X9] [2]:[0]:[48]:[00:92:00:00:00:10]: path 27.0.0.7 loses to path Static announcement as ES 03:44:38:39:ff:ff:02:00:00:01 is same and local
2025/02/20 03:06:20.131452 BGP: [JW7VP-K1YVV] [2]:[0]:[48]:[00:92:00:00:00:10](VRF default): Comparing path 27.0.0.8 flags Valid with path Static announcement flags Selected Valid Attr Changed Unsorted
2025/02/20 03:06:20.131456 BGP: [SYTDR-QV6X9] [2]:[0]:[48]:[00:92:00:00:00:10]: path 27.0.0.8 loses to path Static announcement as ES 03:44:38:39:ff:ff:02:00:00:01 is same and local
2025/02/20 03:06:20.131458 BGP: [WEWEC-8SE72] [2]:[0]:[48]:[00:92:00:00:00:10](VRF default): path Static announcement is the bestpath from AS 0 <<<< static is best
2025/02/20 03:06:20.131463 BGP: [Z3A78-GM3G5] bgp_best_selection: [2]:[0]:[48]:[00:92:00:00:00:10](VRF default) pi 27.0.0.7 dmed
2025/02/20 03:06:20.131467 BGP: [Z3A78-GM3G5] bgp_best_selection: [2]:[0]:[48]:[00:92:00:00:00:10](VRF default) pi 27.0.0.8 dmed
2025/02/20 03:06:20.131471 BGP: [N6CTF-2RSKS] [2]:[0]:[48]:[00:92:00:00:00:10](VRF default): After path selection, newbest is path 27.0.0.7 oldbest was Static announce
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 83ad94694bc061e1ff5f43db42cba46320e0df73)
| -rw-r--r-- | bgpd/bgp_route.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 1b30487bc3..39172cc082 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -3195,21 +3195,6 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_dest *dest, bgp_path_info_unset_flag(dest, look_thru, BGP_PATH_DMED_CHECK); - if (CHECK_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED) && - (!CHECK_FLAG(look_thru->flags, - BGP_PATH_DMED_SELECTED))) { - bgp_path_info_unset_flag(dest, look_thru, - BGP_PATH_DMED_CHECK); - if (debug) - zlog_debug("%s: %pBD(%s) pi %s dmed", - __func__, dest, - bgp->name_pretty, - look_thru->peer->host); - - worse = look_thru; - continue; - } - reason = dest->reason; any_comparisons = true; if (bgp_path_info_cmp(bgp, first, look_thru, &paths_eq, |
