Merge pull request #17251 from donaldsharp/bgp_best_path_evpn_issue

bgpd: bestpath failure when you have a singlepath not in holddown
This commit is contained in:
Russ White 2024-10-29 10:16:37 -04:00 committed by GitHub
commit 56495a88df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3198,6 +3198,7 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_dest *dest,
struct bgp_path_info *end =
bgp_dest_get_bgp_path_info(dest);
if (end && any_comparisons) {
for (; end && end->next != NULL; end = end->next)
;
@ -3207,6 +3208,13 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_dest *dest,
bgp_dest_set_bgp_path_info(dest, first);
first->prev = end;
first->next = NULL;
} else {
bgp_dest_set_bgp_path_info(dest, first);
if (end)
end->prev = first;
first->next = end;
first->prev = NULL;
}
dest->reason = first->reason;
} else {