From: Stephen Hemminger Date: Wed, 13 Jan 2010 00:32:39 +0000 (+0000) Subject: bgpd: fix crash when allowas-in is done on inactive peer X-Git-Tag: frr-2.0-rc1~1584 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d9d4ae5157207b9b8bdb167983519a7ffb860f2c;p=mirror%2Ffrr.git bgpd: fix crash when allowas-in is done on inactive peer When allowas-in is changed on a peer that is not up, BGP would crash trying to do route_refresh. If peer is not up, there is no need to do notification or send. Signed-off-by: Stephen Hemminger Acked-by: Feng Lu Signed-off-by: David Lamparter --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 6a21b11abc..2fe300c5a8 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2293,6 +2293,9 @@ peer_change_action (struct peer *peer, afi_t afi, safi_t safi, if (CHECK_FLAG (peer->sflags, PEER_STATUS_GROUP)) return; + if (peer->status != Established) + return; + if (type == peer_change_reset) bgp_notify_send (peer, BGP_NOTIFY_CEASE, BGP_NOTIFY_CEASE_CONFIG_CHANGE);