Skip to content

Commit

Permalink
Merge pull request #13386 from donaldsharp/bgp_received_routes
Browse files Browse the repository at this point in the history
bgpd: Fix `received-routes detail`
  • Loading branch information
ton31337 authored Apr 26, 2023
2 parents 13c4261 + 24dede9 commit 34a8441
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -14277,7 +14277,6 @@ show_adj_route(struct vty *vty, struct peer *peer, struct bgp_table *table,
for (ain = dest->adj_in; ain; ain = ain->next) {
if (ain->peer != peer)
continue;

show_adj_route_header(vty, peer, table, header1,
header2, json, json_scode,
json_ocode, wide, detail);
Expand Down Expand Up @@ -14328,9 +14327,23 @@ show_adj_route(struct vty *vty, struct peer *peer, struct bgp_table *table,
if (use_json)
json_net =
json_object_new_object();

struct bgp_path_info bpi;
struct bgp_dest buildit = *dest;
struct bgp_dest *pass_in;

if (route_filtered ||
ret == RMAP_DENY) {
bpi.attr = &attr;
bpi.peer = peer;
buildit.info = &bpi;

pass_in = &buildit;
} else
pass_in = dest;
bgp_show_path_info(
NULL /* prefix_rd */, dest, vty,
bgp, afi, safi, json_net,
NULL, pass_in, vty, bgp, afi,
safi, json_net,
BGP_PATH_SHOW_ALL, &display,
RPKI_NOT_BEING_USED);
if (use_json)
Expand Down

0 comments on commit 34a8441

Please sign in to comment.