diff options
| author | Daniel Walton <dwalton@cumulusnetworks.com> | 2017-08-31 16:58:38 +0000 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-01-10 12:15:44 -0500 |
| commit | 95077abf60fb8fb5c656aa477e5d36a644f9bae5 (patch) | |
| tree | 802ec1fb5944546198f0f37384d267ed44b4618d | |
| parent | d215f9a9fa14aa044a2524a22018474b6ef33239 (diff) | |
bgpd: 'summary' to show NoNeg if peer did not negotiate afi/safi
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>
| -rw-r--r-- | bgpd/bgp_vty.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 1be71d1e46..fd03f6ca7c 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -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)"); |
