diff options
| -rw-r--r-- | bgpd/bgp_route.c | 12 | ||||
| -rw-r--r-- | bgpd/bgp_vty.c | 2 | ||||
| -rw-r--r-- | tests/.gitignore | 1 |
3 files changed, 10 insertions, 5 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 77a0b5fea7..2c792b7abf 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -550,6 +550,7 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new, char *pfx_buf, afi_t afi, safi_t safi, enum bgp_path_selection_reason *reason) { + const struct prefix *new_p; struct attr *newattr, *existattr; bgp_peer_sort_t new_sort; bgp_peer_sort_t exist_sort; @@ -614,10 +615,13 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new, newattr = new->attr; existattr = exist->attr; + new_p = bgp_dest_get_prefix(new->net); + /* For EVPN routes, we cannot just go by local vs remote, we have to * look at the MAC mobility sequence number, if present. */ - if (safi == SAFI_EVPN) { + if ((safi == SAFI_EVPN) + && (new_p->u.prefix_evpn.route_type == BGP_EVPN_MAC_IP_ROUTE)) { /* This is an error condition described in RFC 7432 Section * 15.2. The RFC * states that in this scenario "the PE MUST alert the operator" @@ -630,9 +634,9 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new, */ if (newattr->sticky != existattr->sticky) { if (!debug) { - prefix2str( - bgp_dest_get_prefix(new->net), pfx_buf, - sizeof(*pfx_buf) * PREFIX2STR_BUFFER); + prefix2str(new_p, pfx_buf, + sizeof(*pfx_buf) + * PREFIX2STR_BUFFER); bgp_path_info_path_with_addpath_rx_str( new, new_buf, sizeof(new_buf)); bgp_path_info_path_with_addpath_rx_str( diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 9be614ad62..1fa6d4f002 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -17754,7 +17754,7 @@ int bgp_config_write(struct vty *vty) /* BGP timers configuration. */ if (bgp->default_keepalive != SAVE_BGP_KEEPALIVE - && bgp->default_holdtime != SAVE_BGP_HOLDTIME) + || bgp->default_holdtime != SAVE_BGP_HOLDTIME) vty_out(vty, " timers bgp %u %u\n", bgp->default_keepalive, bgp->default_holdtime); diff --git a/tests/.gitignore b/tests/.gitignore index 0c938beab6..fb2edc939a 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -31,6 +31,7 @@ /lib/test_heavy_wq /lib/test_idalloc /lib/test_memory +/lib/test_nexthop /lib/test_nexthop_iter /lib/test_ntop /lib/test_prefix2str |
