Skip to content

Commit

Permalink
bgpd: Show unmodified version of received-routes per neighbor
Browse files Browse the repository at this point in the history
If we have soft inbound enabled, we should see how the route looks like
before it was modified by a route-map/prefix-list.

Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Sep 27, 2024
1 parent 8b1b531 commit 60016a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -14513,7 +14513,7 @@ show_adj_route(struct vty *vty, struct peer *peer, struct bgp_table *table,
struct bgp_adj_out *adj = NULL;
struct bgp_dest *dest;
struct bgp *bgp;
struct attr attr;
struct attr attr, attr_unchanged;
int ret;
struct update_subgroup *subgrp;
struct peer_af *paf = NULL;
Expand Down Expand Up @@ -14693,6 +14693,7 @@ show_adj_route(struct vty *vty, struct peer *peer, struct bgp_table *table,
}

attr = *ain->attr;
attr_unchanged = *ain->attr;
route_filtered = false;

/* Filter prefix using distribute list,
Expand Down Expand Up @@ -14748,9 +14749,8 @@ show_adj_route(struct vty *vty, struct peer *peer, struct bgp_table *table,
json_ar, json_net,
"%pFX", rn_p);
} else
route_vty_out_tmp(vty, bgp, dest, rn_p,
&attr, safi, use_json,
json_ar, wide);
route_vty_out_tmp(vty, bgp, dest, rn_p, &attr_unchanged,
safi, use_json, json_ar, wide);
bgp_attr_flush(&attr);
(*output_count)++;
}
Expand Down

0 comments on commit 60016a8

Please sign in to comment.