diff options
Diffstat (limited to 'bgpd/bgp_mpath.c')
| -rw-r--r-- | bgpd/bgp_mpath.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c index 84c847d796..32a5e14b11 100644 --- a/bgpd/bgp_mpath.c +++ b/bgpd/bgp_mpath.c @@ -142,21 +142,15 @@ int bgp_path_info_nexthop_cmp(struct bgp_path_info *bpi1, &bpi2->attr->mp_nexthop_global); break; case BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL: - addr1 = (CHECK_FLAG( - bpi1->attr->nh_flag, - BGP_ATTR_NH_MP_PREFER_GLOBAL)) + addr1 = (bpi1->attr->mp_nexthop_prefer_global) ? bpi1->attr->mp_nexthop_global : bpi1->attr->mp_nexthop_local; - addr2 = (CHECK_FLAG( - bpi2->attr->nh_flag, - BGP_ATTR_NH_MP_PREFER_GLOBAL)) + addr2 = (bpi2->attr->mp_nexthop_prefer_global) ? bpi2->attr->mp_nexthop_global : bpi2->attr->mp_nexthop_local; - if (!CHECK_FLAG(bpi1->attr->nh_flag, - BGP_ATTR_NH_MP_PREFER_GLOBAL) && - !CHECK_FLAG(bpi2->attr->nh_flag, - BGP_ATTR_NH_MP_PREFER_GLOBAL)) + if (!bpi1->attr->mp_nexthop_prefer_global + && !bpi2->attr->mp_nexthop_prefer_global) compare = !bgp_interface_same( bpi1->peer->ifp, bpi2->peer->ifp); |
