summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2020-12-03 05:04:19 +0100
committerDonald Sharp <sharpd@nvidia.com>2023-02-16 13:42:39 +0100
commitde692a4ebe0b8ea8e191d8ac1f3b41a386edd577 (patch)
tree72f55fd0f6a83d696d983bec65460ca2fe27ff5c /bgpd/bgp_route.c
parentMerge pull request #12794 from anlancs/fix/doc-pid-path (diff)
downloadfrr-de692a4ebe0b8ea8e191d8ac1f3b41a386edd577.tar.xz
frr-de692a4ebe0b8ea8e191d8ac1f3b41a386edd577.zip
bgpd: Fix deterministic-med check for stale paths
When performing deterministic MED processing, ensure that the peer status is not checked when we encounter a stale path. Otherwise, this path will be skipped from the DMED consideration leading to it potentially not being installed. Test scenario: Consider a prefix with 2 (multi)paths. The peer that announces the path with the winning DMED undergoes a graceful-restart. Before it comes back up, the other path goes away. Prior to the fix, a third router that receives both these paths would have ended up not having any path installed to the prefix after the above events. Signed-off-by: Vivek Venkatraman <vivek@nvidia.com> For internal use: Ticket: CM-32032 Testing done: Multiple manual testing
Diffstat (limited to '')
-rw-r--r--bgpd/bgp_route.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 23e6195d3..6def66c02 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -2658,9 +2658,12 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_dest *dest,
continue;
if (BGP_PATH_HOLDDOWN(pi1))
continue;
- if (pi1->peer != bgp->peer_self)
+ if (pi1->peer != bgp->peer_self &&
+ !CHECK_FLAG(pi1->peer->sflags,
+ PEER_STATUS_NSF_WAIT)) {
if (!peer_established(pi1->peer))
continue;
+ }
new_select = pi1;
if (pi1->next) {