Skip to content

Commit

Permalink
bgpd: add missing white-space between route short status and network …
Browse files Browse the repository at this point in the history
…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   <[email protected]>
  • Loading branch information
campescassiano committed Mar 19, 2024
1 parent 5e42011 commit a9634e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions bgpd/bgp_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a9634e7

Please sign in to comment.