]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Print large-community inside bgp_dump_attr()
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Fri, 8 Jan 2021 14:09:34 +0000 (16:09 +0200)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Sat, 9 Jan 2021 07:10:21 +0000 (09:10 +0200)
Missing large communities.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
bgpd/bgp_debug.c

index 2c076fb80b2e6f863f8bf3fc95b11d8510ca265d..cd5bef179856628bca9fbaf048b19e49321c43c1 100644 (file)
@@ -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));