summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_debug.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-01-08 15:09:34 +0100
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-01-09 08:10:21 +0100
commit07b24afe49122118f4348910b16c2bd1c0b9415e (patch)
treea8eb67be3e121d6d853b8cb6a3b9b868348af522 /bgpd/bgp_debug.c
parentMerge pull request #7842 from donaldsharp/wait_for_convergence (diff)
downloadfrr-07b24afe49122118f4348910b16c2bd1c0b9415e.tar.xz
frr-07b24afe49122118f4348910b16c2bd1c0b9415e.zip
bgpd: Print large-community inside bgp_dump_attr()
Missing large communities. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_debug.c')
-rw-r--r--bgpd/bgp_debug.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c
index 2c076fb80..cd5bef179 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));