]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix 'show ip bgp summary' variable output being wrong 8/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 16 Dec 2016 02:28:51 +0000 (21:28 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 16 Dec 2016 20:49:40 +0000 (15:49 -0500)
The first time through calling 'show ip bgp summary'
we were always calculating the variable hostname field
size incorrectly.

Ticket: CM-13900
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_vty.c

index 5dafac1e062108b3f41145d0f3c822870ae69d1c..b0d96150a8facf55817e85d6fd01430c16390e30 100644 (file)
@@ -10317,6 +10317,10 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi,
 
           if (peer->afc[afi][safi])
            {
+             memset(dn_flag, '\0', sizeof(dn_flag));
+             if (peer_dynamic_neighbor(peer))
+               dn_flag[0] = '*';
+
              if (peer->hostname && bgp_flag_check(bgp, BGP_FLAG_SHOW_HOSTNAME))
                sprintf(neighbor_buf, "%s%s(%s) ", dn_flag, peer->hostname, peer->host);
              else