mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
bgpd: Show neighbors software version if description is not set
Also, this is visible only if `capability software-version` is enabled. Example: ``` r1# show ip bgp summary 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 MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc 192.168.1.2 4 65002 54 54 0 0 0 00:00:52 0 0 FRRouting/9.1-dev-My Total number of neighbors 1 r1# ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
c75c96a02f
commit
71c93270f7
|
@ -11930,14 +11930,23 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
|
|||
}
|
||||
/* Make sure `Desc` column is the lastest in
|
||||
* the output.
|
||||
* If the description is not set, try
|
||||
* to print the software version if the
|
||||
* capability is enabled and received.
|
||||
*/
|
||||
if (peer->desc)
|
||||
vty_out(vty, " %s",
|
||||
bgp_peer_description_stripped(
|
||||
peer->desc,
|
||||
show_wide ? 64 : 20));
|
||||
else
|
||||
else if (peer->soft_version) {
|
||||
vty_out(vty, " %s",
|
||||
bgp_peer_description_stripped(
|
||||
peer->soft_version,
|
||||
show_wide ? 64 : 20));
|
||||
} else {
|
||||
vty_out(vty, " N/A");
|
||||
}
|
||||
vty_out(vty, "\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue