From 07b24afe49122118f4348910b16c2bd1c0b9415e Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Fri, 8 Jan 2021 16:09:34 +0200 Subject: [PATCH] bgpd: Print large-community inside bgp_dump_attr() Missing large communities. Signed-off-by: Donatas Abraitis --- bgpd/bgp_debug.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 2c076fb80b..cd5bef1798 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -38,6 +38,7 @@ #include "bgpd/bgp_attr.h" #include "bgpd/bgp_debug.h" #include "bgpd/bgp_community.h" +#include "bgpd/bgp_lcommunity.h" #include "bgpd/bgp_updgrp.h" #include "bgpd/bgp_mplsvpn.h" #include "bgpd/bgp_ecommunity.h" @@ -411,6 +412,11 @@ bool bgp_dump_attr(struct attr *attr, char *buf, size_t size) ", community %s", community_str(attr->community, false)); + if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES))) + snprintf(buf + strlen(buf), size - strlen(buf), + ", large-community %s", + lcommunity_str(attr->lcommunity, false)); + if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES))) snprintf(buf + strlen(buf), size - strlen(buf), ", extcommunity %s", ecommunity_str(attr->ecommunity)); -- 2.39.5