summaryrefslogtreecommitdiff
path: root/bgpd/bgp_attr.c
diff options
context:
space:
mode:
authorEnke Chen <enchen@paloaltonetworks.com>2024-10-14 18:42:15 -0700
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-10-15 14:25:06 +0000
commit3394680c23417f9d952dad85b5058dc4cbb7a561 (patch)
tree058f21c0c96a618d2d441445def88ed7a6ad3e9f /bgpd/bgp_attr.c
parent5a48cef8f55ce8c5c850ad0d4a3fd07cd0eba8a7 (diff)
bgpd: fix route selection with AIGP
The nexthop metric should be added to AIGP when calculating the bestpath in bgp_path_info_cmp(). Signed-off-by: Enke Chen <enchen@paloaltonetworks.com> (cherry picked from commit 081422e8e71085d3a3d4d2ff0bc1e1abaff0d52e)
Diffstat (limited to 'bgpd/bgp_attr.c')
-rw-r--r--bgpd/bgp_attr.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index e4ee589a38..f4215c43b0 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -479,16 +479,6 @@ static bool bgp_attr_aigp_get_tlv_metric(uint8_t *pnt, int length,
return false;
}
-static uint64_t bgp_aigp_metric_total(struct bgp_path_info *bpi)
-{
- uint64_t aigp = bgp_attr_get_aigp_metric(bpi->attr);
-
- if (bpi->nexthop)
- return aigp + bpi->nexthop->metric;
- else
- return aigp;
-}
-
static void stream_put_bgp_aigp_tlv_metric(struct stream *s,
struct bgp_path_info *bpi)
{