summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2020-10-06 10:51:22 -0400
committerGitHub <noreply@github.com>2020-10-06 10:51:22 -0400
commit6d3ce189ad78fdd579f6b2683a0b15342c1cc7dd (patch)
tree8087f3d8f33974c3df4ca8c3ed9b10c001e0b4fa
parent24d7ccfabdc707361670dd3c044d6442f24e67cb (diff)
parent1664b411195737535f52b774f68d3e431ce02560 (diff)
Merge pull request #7248 from donaldsharp/revert_7113
Revert "bgpd: allow bestpath to handle mutliple locally-originated pa…
-rw-r--r--bgpd/bgp_route.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 941bae4ff4..15c1df8473 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -550,7 +550,6 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
bool same_esi;
bool old_proxy;
bool new_proxy;
- bool new_origin, exist_origin;
*paths_eq = 0;
@@ -795,12 +794,8 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
* - BGP_ROUTE_AGGREGATE
* - BGP_ROUTE_REDISTRIBUTE
*/
- new_origin = !(new->sub_type == BGP_ROUTE_NORMAL ||
- 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) {
+ if (!(new->sub_type == BGP_ROUTE_NORMAL ||
+ new->sub_type == BGP_ROUTE_IMPORTED)) {
*reason = bgp_path_selection_local_route;
if (debug)
zlog_debug(
@@ -809,7 +804,8 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new,
return 1;
}
- if (!new_origin && exist_origin) {
+ if (!(exist->sub_type == BGP_ROUTE_NORMAL ||
+ exist->sub_type == BGP_ROUTE_IMPORTED)) {
*reason = bgp_path_selection_local_route;
if (debug)
zlog_debug(