diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-13 12:08:38 -0400 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-13 12:08:38 -0400 |
| commit | 1f35b46a2f35d59b86ed3ee557aa1c9fcf2fcac9 (patch) | |
| tree | 27de606b3510b126766ac7a0ac9eb8ddf4573ab0 /bgpd/bgp_mpath.c | |
| parent | d47ae3db4cf14c72d8468d61113ac88e19235791 (diff) | |
| parent | c1a003878246ccc84ab5986558ca959f4545f738 (diff) | |
Merge branch 'master' into docuser
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_mpath.c')
| -rw-r--r-- | bgpd/bgp_mpath.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c index 5d83192a30..667be50842 100644 --- a/bgpd/bgp_mpath.c +++ b/bgpd/bgp_mpath.c @@ -141,16 +141,17 @@ int bgp_info_nexthop_cmp(struct bgp_info *bi1, struct bgp_info *bi2) &bi2->attr->mp_nexthop_global); break; case BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL: - addr1 = (bi1->attr->mp_nexthop_prefer_global) ? - bi1->attr->mp_nexthop_global - : bi1->attr->mp_nexthop_local; - addr2 = (bi2->attr->mp_nexthop_prefer_global) ? - bi2->attr->mp_nexthop_global - : bi2->attr->mp_nexthop_local; - - if (!bi1->attr->mp_nexthop_prefer_global && - !bi2->attr->mp_nexthop_prefer_global) - compare = !bgp_interface_same(bi1->peer->ifp, bi2->peer->ifp); + addr1 = (bi1->attr->mp_nexthop_prefer_global) + ? bi1->attr->mp_nexthop_global + : bi1->attr->mp_nexthop_local; + addr2 = (bi2->attr->mp_nexthop_prefer_global) + ? bi2->attr->mp_nexthop_global + : bi2->attr->mp_nexthop_local; + + if (!bi1->attr->mp_nexthop_prefer_global + && !bi2->attr->mp_nexthop_prefer_global) + compare = !bgp_interface_same( + bi1->peer->ifp, bi2->peer->ifp); if (!compare) compare = IPV6_ADDR_CMP(&addr1, &addr2); |
