summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-07-07 09:08:25 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-08-08 10:28:54 -0400
commit4192df64c9185b48d60deefac81927a25fb688a9 (patch)
treeb173d9a7fb59503d0a67e058b4164a20e359fb1f
parent8a893163781c618620c25372638d7c80eb80595b (diff)
bgpd: Fix output of interface based 'show bgp ..' commands
When issuing a 'show ip bgp' command and the nexthop is a interface, if the interface name was greater than 7 characters we would arbitrarily start a new-line and setup the next line to start at the wrong spot. Modify the interface field to allow 16 characters than 7( to match v6 display ), and if the interface name is greater than 16 characters properly setup the next line for display Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--bgpd/bgp_route.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 44e5af578d..bce54ab2d0 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -6513,15 +6513,14 @@ void route_vty_out(struct vty *vty, struct prefix *p, struct bgp_info *binfo,
len = vty_out(
vty, "%s",
binfo->peer->conf_if);
- len =
- 7 - len; /* len of IPv6
- addr + max
- len of def
- ifname */
+ len = 16 - len; /* len of IPv6
+ addr + max
+ len of def
+ ifname */
if (len < 1)
vty_out(vty, "\n%*s",
- 45, " ");
+ 36, " ");
else
vty_out(vty, "%*s", len,
" ");