From fa5f7ad597cb18f49bd9a91c5ce8566153f229f8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 May 2015 18:04:00 -0700 Subject: [PATCH] Ensure that during event-driven route-map processing, the peer status is considered, if required. Attempting to do certain processing while the peer is not Established can lead to errors. --- bgpd/bgp_routemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index f133a57a19..09bbb01fe9 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -2670,7 +2670,7 @@ bgp_route_map_process_peer (char *rmap_name, struct peer *peer, filter->map[RMAP_IN].map = route_map_lookup_by_name (filter->map[RMAP_IN].name); - if (route_update) + if (route_update && peer->status == Established) { if (CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_SOFT_RECONFIG)) @@ -2717,7 +2717,7 @@ bgp_route_map_process_peer (char *rmap_name, struct peer *peer, update = 1; } - if (update && route_update) + if (update && route_update && peer->status == Established) { if (CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_SOFT_RECONFIG)) -- 2.39.5