mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 07:21:59 +00:00
bgpd: use igpmetric in bgp_aigp_metric_total()
Use igpmetric from bgp_path_info in bgp_igp_metric_total() to be
consistent with all other cases, e.g., as in bgp_path_info_cmp().
Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
(cherry picked from commit b89e66a3bc
)
This commit is contained in:
parent
9251198c20
commit
1163a1ef58
@ -604,10 +604,11 @@ static inline uint64_t bgp_aigp_metric_total(struct bgp_path_info *bpi)
|
|||||||
{
|
{
|
||||||
uint64_t aigp = bgp_attr_get_aigp_metric(bpi->attr);
|
uint64_t aigp = bgp_attr_get_aigp_metric(bpi->attr);
|
||||||
|
|
||||||
if (bpi->nexthop)
|
/* Don't increment if it's locally sourced */
|
||||||
return aigp + bpi->nexthop->metric;
|
if (bpi->peer == bpi->peer->bgp->peer_self)
|
||||||
else
|
|
||||||
return aigp;
|
return aigp;
|
||||||
|
|
||||||
|
return bpi->extra ? (aigp + bpi->extra->igpmetric) : aigp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct cluster_list *bgp_attr_get_cluster(const struct attr *attr)
|
static inline struct cluster_list *bgp_attr_get_cluster(const struct attr *attr)
|
||||||
|
Loading…
Reference in New Issue
Block a user