mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 11:44:16 +00:00
bgpd: Show software version in bgp summary
E.g.: ``` $ vtysh -c 'show bgp summary json' | jq '.ipv4Unicast.peers' { "127.0.0.1": { "hostname": "donatas.net", "softwareVersion": "GoBGP/3.26.0", "remoteAs": 65001, "localAs": 65001, "version": 4, "msgRcvd": 12, "msgSent": 16, "tableVersion": 0, "outq": 0, "inq": 0, "peerUptime": "00:00:10", "peerUptimeMsec": 10000, "peerUptimeEstablishedEpoch": 1721908563, "pfxRcd": 0, "pfxSnt": 0, "state": "Established", "peerState": "OK", "connectionsEstablished": 1, "connectionsDropped": 0, "idType": "ipv4" }, "127.0.0.3": { "hostname": "putin-xujlo", "domainname": "donatas.net", "softwareVersion": "ExaBGP/5.0.0-20240725+main-a56c70e84a", "remoteAs": 65003, "localAs": 65001, "version": 4, "msgRcvd": 3, "msgSent": 7, "tableVersion": 0, "outq": 0, "inq": 0, "peerUptime": "00:00:13", "peerUptimeMsec": 13000, "peerUptimeEstablishedEpoch": 1721908560, "pfxRcd": 0, "pfxSnt": 0, "state": "Established", "peerState": "OK", "connectionsEstablished": 1, "connectionsDropped": 0, "idType": "ipv4" } } ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
bd86964db8
commit
968ae85252
@ -12329,6 +12329,12 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
|
|||||||
json_object_string_add(json_peer, "domainname",
|
json_object_string_add(json_peer, "domainname",
|
||||||
peer->domainname);
|
peer->domainname);
|
||||||
|
|
||||||
|
json_object_string_add(json_peer,
|
||||||
|
"softwareVersion",
|
||||||
|
peer->soft_version
|
||||||
|
? peer->soft_version
|
||||||
|
: "n/a");
|
||||||
|
|
||||||
asn_asn2json(json_peer, "remoteAs", peer->as,
|
asn_asn2json(json_peer, "remoteAs", peer->as,
|
||||||
bgp->asnotation);
|
bgp->asnotation);
|
||||||
asn_asn2json(json_peer, "localAs",
|
asn_asn2json(json_peer, "localAs",
|
||||||
|
Loading…
Reference in New Issue
Block a user