diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-25 02:41:59 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-11-27 14:21:56 +0100 |
commit | 0f672529d86b4c55f11c761f171f635ebb4bdb10 (patch) | |
tree | a074c017676aed9f54160dc5d7c400b803903ed9 /bgpd | |
parent | bgpd: When we don't have a route-map to apply don't apply the original (diff) | |
download | frr-0f672529d86b4c55f11c761f171f635ebb4bdb10.tar.xz frr-0f672529d86b4c55f11c761f171f635ebb4bdb10.zip |
bgpd: Store original route-map type for the peer
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>
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_route.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 3a7cfc4f2..1d267f259 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1160,6 +1160,7 @@ static int bgp_output_modifier(struct peer *peer, struct prefix *p, 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 @@ -1188,12 +1189,13 @@ static int bgp_output_modifier(struct peer *peer, struct prefix *p, 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) /* |