From 540528864d85a3b00e0794da769497ecfb8e0c27 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 11 Feb 2020 18:02:19 +0200 Subject: [PATCH] bgpd: Format properly `show bgp summary failed` Before: ``` Neighbor EstdCnt DropCnt ResetTime Reason 192.168.0.1 0 0 never Waiting for peer OPEN ``` After: ``` Neighbor EstdCnt DropCnt ResetTime Reason 192.168.0.1 0 0 never Waiting for peer OPEN ``` Signed-off-by: Donatas Abraitis --- bgpd/bgp_vty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 53d9732956db..243822206cfb 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -8063,7 +8063,7 @@ static void bgp_show_peer_reset(struct vty * vty, struct peer *peer, : "received", code_str, subcode_str); } else { - vty_out(vty, " %s\n", + vty_out(vty, " %s\n", peer_down_str[(int)peer->last_reset]); } } @@ -8119,7 +8119,7 @@ static void bgp_show_failed_summary(struct vty *vty, struct bgp *bgp, if (len < max_neighbor_width) vty_out(vty, "%*s", max_neighbor_width - len, " "); - vty_out(vty, "%7d %7d %8s", peer->established, + vty_out(vty, "%7d %7d %9s", peer->established, peer->dropped, peer_uptime(peer->uptime, timebuf, BGP_UPTIME_LEN, 0, NULL));