]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: 'summary' to show NoNeg if peer did not negotiate afi/safi 1619/head
authorDaniel Walton <dwalton@cumulusnetworks.com>
Thu, 31 Aug 2017 16:58:38 +0000 (16:58 +0000)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 10 Jan 2018 17:15:44 +0000 (12:15 -0500)
If we have configured neighbor 1.1.1.1 for an afi/safi but they have not
activated that afi/safi with us then display "NoNeg" in the state column
of the summary output.  This is to make troubleshooting afi/safi
easier.

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
bgpd/bgp_vty.c

index 1be71d1e461aab077dbd64b9b8254e95fa1c8d69..fd03f6ca7c7daf0b39afe3a890433fd79c5baefb 100644 (file)
@@ -7119,8 +7119,11 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
                                            BGP_UPTIME_LEN, 0, NULL));
 
                        if (peer->status == Established)
-                               vty_out(vty, " %12ld",
-                                       peer->pcount[afi][pfx_rcd_safi]);
+                               if (peer->afc_recv[afi][pfx_rcd_safi])
+                                       vty_out(vty, " %12ld",
+                                               peer->pcount[afi][pfx_rcd_safi]);
+                               else
+                                       vty_out(vty, " NoNeg");
                        else {
                                if (CHECK_FLAG(peer->flags, PEER_FLAG_SHUTDOWN))
                                        vty_out(vty, " Idle (Admin)");