mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 03:28:31 +00:00
Merge pull request #7274 from donaldsharp/bgp_best_is_a_path
bgpd: allow bestpath to handle mutliple locally-originated paths
This commit is contained in:
commit
dc7b85a2f9
@ -562,6 +562,7 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
|
|||||||
bool same_esi;
|
bool same_esi;
|
||||||
bool old_proxy;
|
bool old_proxy;
|
||||||
bool new_proxy;
|
bool new_proxy;
|
||||||
|
bool new_origin, exist_origin;
|
||||||
|
|
||||||
*paths_eq = 0;
|
*paths_eq = 0;
|
||||||
|
|
||||||
@ -806,8 +807,12 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
|
|||||||
* - BGP_ROUTE_AGGREGATE
|
* - BGP_ROUTE_AGGREGATE
|
||||||
* - BGP_ROUTE_REDISTRIBUTE
|
* - BGP_ROUTE_REDISTRIBUTE
|
||||||
*/
|
*/
|
||||||
if (!(new->sub_type == BGP_ROUTE_NORMAL ||
|
new_origin = !(new->sub_type == BGP_ROUTE_NORMAL ||
|
||||||
new->sub_type == BGP_ROUTE_IMPORTED)) {
|
new->sub_type == BGP_ROUTE_IMPORTED);
|
||||||
|
exist_origin = !(exist->sub_type == BGP_ROUTE_NORMAL ||
|
||||||
|
exist->sub_type == BGP_ROUTE_IMPORTED);
|
||||||
|
|
||||||
|
if (new_origin && !exist_origin) {
|
||||||
*reason = bgp_path_selection_local_route;
|
*reason = bgp_path_selection_local_route;
|
||||||
if (debug)
|
if (debug)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
@ -816,8 +821,7 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(exist->sub_type == BGP_ROUTE_NORMAL ||
|
if (!new_origin && exist_origin) {
|
||||||
exist->sub_type == BGP_ROUTE_IMPORTED)) {
|
|
||||||
*reason = bgp_path_selection_local_route;
|
*reason = bgp_path_selection_local_route;
|
||||||
if (debug)
|
if (debug)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
|
Loading…
Reference in New Issue
Block a user