When we are applying an experimental route-map type
to a peer( as part of a show command ) save and
restore the peer's ->rmap_type.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
struct bgp_info info;
route_map_result_t ret;
struct route_map *rmap = NULL;
+ u_char rmap_type;
/*
* So if we get to this point and have no rmap_name
info.peer = peer;
info.attr = attr;
+ rmap_type = peer->rmap_type;
SET_FLAG(peer->rmap_type, PEER_RMAP_TYPE_OUT);
/* Apply BGP route map to the attribute. */
ret = route_map_apply(rmap, p, RMAP_BGP, &info);
- peer->rmap_type = 0;
+ peer->rmap_type = rmap_type;
if (ret == RMAP_DENYMATCH)
/*