forked from Mirror/frr
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:
commit
56495a88df
|
@ -3198,6 +3198,7 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_dest *dest,
|
||||||
struct bgp_path_info *end =
|
struct bgp_path_info *end =
|
||||||
bgp_dest_get_bgp_path_info(dest);
|
bgp_dest_get_bgp_path_info(dest);
|
||||||
|
|
||||||
|
if (end && any_comparisons) {
|
||||||
for (; end && end->next != NULL; end = end->next)
|
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);
|
bgp_dest_set_bgp_path_info(dest, first);
|
||||||
first->prev = end;
|
first->prev = end;
|
||||||
first->next = NULL;
|
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;
|
dest->reason = first->reason;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue