diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-01-11 10:47:33 +0200 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-01-11 10:53:57 +0200 |
| commit | 584b031a4d0b7e20cd3835c8945451dcdac07998 (patch) | |
| tree | de4d5c28f8af4c17db47ea87add52c37cb6ca33f /bgpd/bgp_route.c | |
| parent | a8474e4a464ade1d7dd942d82cda9e219329ebb4 (diff) | |
bgpd: Show external session sub-type (OAD) if exists
```
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 <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_route.c')
| -rw-r--r-- | bgpd/bgp_route.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 211eeeaf3f..d6aa41bd36 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -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) { |
