From a9634e7b8db39ed7b65bc4cff348e478f7e70a6b Mon Sep 17 00:00:00 2001 From: Cassiano Campes Date: Mon, 11 Mar 2024 22:33:16 -0300 Subject: [PATCH] bgpd: add missing white-space between route short status and network columns When running `show ip bgp` command, the 'route short status' and 'network' columns do not have white-space between them. Old show: Network Next Hop Metric LocPrf Weight Path *>i1.1.1.1/32 10.1.12.111 0 100 0 i New show: Network Next Hop Metric LocPrf Weight Path *>i 1.1.1.1/32 10.1.12.111 0 100 0 i Added white-space to enhance readability between them. Signed-off-by: Cassiano Campes --- bgpd/bgp_route.c | 3 +++ bgpd/bgp_route.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index d726edcc9f9a..f30b31cdd9ed 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -9046,6 +9046,9 @@ static void route_vty_short_status_out(struct vty *vty, vty_out(vty, "i"); else vty_out(vty, " "); + + /* adding space between next column */ + vty_out(vty, " "); } static char *bgp_nexthop_hostname(struct peer *peer, diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h index 2d82f0f206f7..9be3f063f385 100644 --- a/bgpd/bgp_route.h +++ b/bgpd/bgp_route.h @@ -66,8 +66,8 @@ enum bgp_show_adj_route_type { #define BGP_SHOW_NCODE_HEADER "Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self\n" #define BGP_SHOW_RPKI_HEADER \ "RPKI validation codes: V valid, I invalid, N Not found\n\n" -#define BGP_SHOW_HEADER " Network Next Hop Metric LocPrf Weight Path\n" -#define BGP_SHOW_HEADER_WIDE " Network Next Hop Metric LocPrf Weight Path\n" +#define BGP_SHOW_HEADER " Network Next Hop Metric LocPrf Weight Path\n" +#define BGP_SHOW_HEADER_WIDE " Network Next Hop Metric LocPrf Weight Path\n" /* Maximum number of labels we can process or send with a prefix. We * really do only 1 for MPLS (BGP-LU) but we can do 2 for EVPN-VxLAN.