bgpd: Reuse prep_for_rmap_apply() when applying route-map for show cmd

Include extra path attributes.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2022-09-06 11:49:48 +03:00
parent fd43ffd974
commit 636632c32f

View File

@ -11145,13 +11145,14 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
if (type == bgp_show_type_route_map) {
struct route_map *rmap = output_arg;
struct bgp_path_info path;
struct attr dummy_attr;
struct bgp_path_info_extra extra;
struct attr dummy_attr = {};
route_map_result_t ret;
dummy_attr = *pi->attr;
path.peer = pi->peer;
path.attr = &dummy_attr;
prep_for_rmap_apply(&path, &extra, dest, pi,
pi->peer, &dummy_attr);
ret = route_map_apply(rmap, dest_p, &path);
bgp_attr_flush(&dummy_attr);