Skip to content

Commit

Permalink
bgpd: Show external session sub-type (OAD) if exists
Browse files Browse the repository at this point in the history
```
r1# sh ip bgp 10.10.10.10/32
BGP routing table entry for 10.10.10.10/32, version 1
Paths: (2 available, best #2, table default)
  Advertised to non peer-group peers:
  192.168.1.2 192.168.1.4
  65002 65003
    192.168.1.2 from 192.168.1.2 (192.168.2.2)
      Origin incomplete, metric 123, localpref 123, valid, external (oad)
      Last update: Thu Jan 11 10:46:32 2024
  65004 65005
    192.168.1.4 from 192.168.1.4 (192.168.4.4)
      Origin incomplete, metric 123, localpref 123, valid, external, best (Peer Type)
      Last update: Thu Jan 11 10:46:30 2024
r1#
```

Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Jan 11, 2024
1 parent a8474e4 commit 584b031
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -10684,9 +10684,17 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,
} else {
if (json_paths)
json_object_string_add(
json_peer, "type", "external");
json_peer, "type",
(path->peer->sub_sort ==
BGP_PEER_EBGP_OAD)
? "external (oad)"
: "external");
else
vty_out(vty, ", external");
vty_out(vty, ", %s",
(path->peer->sub_sort ==
BGP_PEER_EBGP_OAD)
? "external (oad)"
: "external");
}
}
} else if (path->sub_type == BGP_ROUTE_AGGREGATE) {
Expand Down

0 comments on commit 584b031

Please sign in to comment.