summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_debug.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-10-12 20:06:47 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-10-26 10:26:57 +0200
commit97a52c82a569f4a2ba792fbd734f5e635a057e6f (patch)
tree83075d412d0a44d8fc2db4d2e55ec1fd405a65b6 /bgpd/bgp_debug.c
parentdoc: Add documentation for AIGP (diff)
downloadfrr-97a52c82a569f4a2ba792fbd734f5e635a057e6f.tar.xz
frr-97a52c82a569f4a2ba792fbd734f5e635a057e6f.zip
bgpd: Implement Accumulated IGP Metric Attribute for BGP
https://www.rfc-editor.org/rfc/rfc7311.html Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_debug.c')
-rw-r--r--bgpd/bgp_debug.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c
index 580c18b58..a629695a3 100644
--- a/bgpd/bgp_debug.c
+++ b/bgpd/bgp_debug.c
@@ -412,6 +412,11 @@ bool bgp_dump_attr(struct attr *attr, char *buf, size_t size)
snprintf(buf + strlen(buf), size - strlen(buf),
", localpref %u", attr->local_pref);
+ if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_AIGP)))
+ snprintf(buf + strlen(buf), size - strlen(buf),
+ ", aigp-metric %" PRIu64,
+ (unsigned long long)bgp_attr_get_aigp_metric(attr));
+
if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_MULTI_EXIT_DISC)))
snprintf(buf + strlen(buf), size - strlen(buf), ", metric %u",
attr->med);