Merge pull request #7839 from ton31337/feature/print_large-community_dump

bgpd: Print large-community inside bgp_dump_attr()
This commit is contained in:
Donald Sharp 2021-01-09 07:25:59 -05:00 committed by GitHub
commit e11922f0e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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));