Skip to content

Commit

Permalink
bgpd: Include local AS for JSON output in show bgp summary json cmd
Browse files Browse the repository at this point in the history
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
  • Loading branch information
ton31337 committed Jan 28, 2021
1 parent 85eeb02 commit c854765
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -10975,6 +10975,11 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
peer->domainname);

json_object_int_add(json_peer, "remoteAs", peer->as);
json_object_int_add(
json_peer, "localAs",
peer->change_local_as
? peer->change_local_as
: peer->local_as);
json_object_int_add(json_peer, "version", 4);
json_object_int_add(json_peer, "msgRcvd",
PEER_TOTAL_RX(peer));
Expand Down

0 comments on commit c854765

Please sign in to comment.