diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-04-10 12:35:09 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-04-22 16:50:08 +0200 |
commit | b29fdafa3f67cc196091f5af6af022a098bc4b65 (patch) | |
tree | aeeaa9bcd99746183fae97b0797923996296bc10 /bgpd | |
parent | bgpd: Add `neighbor ... extended-link-bandwidth` command (diff) | |
download | frr-b29fdafa3f67cc196091f5af6af022a098bc4b65.tar.xz frr-b29fdafa3f67cc196091f5af6af022a098bc4b65.zip |
bgpd: Print IPv6 extended communities for `show bgp <prefix>`
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_route.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 848e8ffd8..7c9b64150 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -10453,6 +10453,7 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn, json_object *json_cluster_list = NULL; json_object *json_cluster_list_list = NULL; json_object *json_ext_community = NULL; + json_object *json_ext_ipv6_community = NULL; json_object *json_last_update = NULL; json_object *json_pmsi = NULL; json_object *json_nexthop_global = NULL; @@ -11161,6 +11162,21 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn, } } + if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_IPV6_EXT_COMMUNITIES)) { + if (json_paths) { + json_ext_ipv6_community = json_object_new_object(); + json_object_string_add(json_ext_ipv6_community, "string", + bgp_attr_get_ipv6_ecommunity(attr) + ->str); + json_object_object_add(json_path, + "extendedIpv6Community", + json_ext_ipv6_community); + } else { + vty_out(vty, " Extended IPv6 Community: %s\n", + bgp_attr_get_ipv6_ecommunity(attr)->str); + } + } + /* Line 6 display Large community */ if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES)) { if (json_paths) { |