forked from Mirror/frr
bgpd: Fix show bgp summary wide
alignment
Before: ``` r1# show ip bgp summary wide IPv4 Unicast Summary (VRF default): BGP router identifier 192.168.1.1, local AS number 65001 vrf-id 0 BGP table version 0 RIB entries 0, using 0 bytes of memory Peers 1, using 725 KiB of memory Neighbor V AS LocalAS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc 192.168.1.2 4 65002 65001 8 8 0 0 0 00:00:05 0 0 FRRouting/9.1-dev-MyOwnFRRVersion-gc5fc0beb46 Total number of neighbors 1 r1# ``` After: ``` r1# show ip bgp summary wide IPv4 Unicast Summary (VRF default): BGP router identifier 192.168.1.1, local AS number 65001 vrf-id 0 BGP table version 0 RIB entries 0, using 0 bytes of memory Peers 1, using 725 KiB of memory Neighbor V AS LocalAS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc 192.168.1.2 4 65002 65001 10 10 0 0 0 00:00:08 0 0 FRRouting/9.1-dev-MyOwnFRRVersion-g4be13ec347 Total number of neighbors 1 r1# ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
71c93270f7
commit
c10d1c8aca
|
@ -11854,7 +11854,7 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
|
||||||
&peer->ibuf->count,
|
&peer->ibuf->count,
|
||||||
memory_order_relaxed);
|
memory_order_relaxed);
|
||||||
|
|
||||||
vty_out(vty, "4 ");
|
vty_out(vty, "4");
|
||||||
vty_out(vty, ASN_FORMAT_SPACE(bgp->asnotation),
|
vty_out(vty, ASN_FORMAT_SPACE(bgp->asnotation),
|
||||||
&peer->as);
|
&peer->as);
|
||||||
if (show_wide)
|
if (show_wide)
|
||||||
|
|
|
@ -67,9 +67,9 @@ extern char *asn_asn2string(const as_t *as, char *buf, size_t len,
|
||||||
((mode == ASNOTATION_DOTPLUS) ? "%pASE" : \
|
((mode == ASNOTATION_DOTPLUS) ? "%pASE" : \
|
||||||
"%pASP"))
|
"%pASP"))
|
||||||
#define ASN_FORMAT_SPACE(mode) \
|
#define ASN_FORMAT_SPACE(mode) \
|
||||||
((mode == ASNOTATION_DOT) ? "%10pASD" : \
|
((mode == ASNOTATION_DOT) \
|
||||||
((mode == ASNOTATION_DOTPLUS) ? "%10pASE" : \
|
? "%11pASD" \
|
||||||
"%10pASP"))
|
: ((mode == ASNOTATION_DOTPLUS) ? "%11pASE" : "%11pASP"))
|
||||||
|
|
||||||
/* for test */
|
/* for test */
|
||||||
extern void asn_relax_as_zero(bool relax);
|
extern void asn_relax_as_zero(bool relax);
|
||||||
|
|
Loading…
Reference in a new issue