]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Display extended communities in debug log
authorvivek <vivek@cumulusnetworks.com>
Mon, 15 May 2017 19:35:15 +0000 (12:35 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 12 Jul 2017 16:34:33 +0000 (12:34 -0400)
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_debug.c

index 5538402070e88033de2891e08f9f481e7189a3c8..450f68fec4f3ffb30871444824ef8c7bbf1851d8 100644 (file)
@@ -39,6 +39,7 @@
 #include "bgpd/bgp_community.h"
 #include "bgpd/bgp_updgrp.h"
 #include "bgpd/bgp_mplsvpn.h"
+#include "bgpd/bgp_ecommunity.h"
 
 unsigned long conf_bgp_debug_as4;
 unsigned long conf_bgp_debug_neighbor_events;
@@ -423,6 +424,10 @@ bgp_dump_attr (struct attr *attr, char *buf, size_t size)
     snprintf (buf + strlen (buf), size - strlen (buf), ", community %s",
              community_str (attr->community));
 
+  if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_EXT_COMMUNITIES)))
+    snprintf (buf + strlen (buf), size - strlen (buf), ", extcommunity %s",
+             ecommunity_str (attr->extra->ecommunity));
+
   if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_ATOMIC_AGGREGATE)))
     snprintf (buf + strlen (buf), size - strlen (buf), ", atomic-aggregate");