bgpd: fix "show ip bgp" column alignment
The "Weight" column is off:
BGP table version is 0, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, =
multipath,
i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 4.1.1.2/32 9.9.9.2 0 32768 ?
*> 4.1.1.4/32 9.9.9.2 0 32768 ?
Displayed 2 out of 2 total prefixes
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index ec2f967..527d5d9 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -6033,12 +6033,12 @@
if (attr->flag & ATTR_FLAG_BIT (BGP_ATTR_MULTI_EXIT_DISC))
- vty_out (vty, "%10u ", attr->med);
+ vty_out (vty, "%10u", attr->med);
else
vty_out (vty, " ");
if (attr->flag & ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF))
- vty_out (vty, "%7u ", attr->local_pref);
+ vty_out (vty, "%7u", attr->local_pref);
else
vty_out (vty, " ");