]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix crash when allowas-in is done on inactive peer
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 13 Jan 2010 00:32:39 +0000 (00:32 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 3 Jun 2014 13:30:22 +0000 (15:30 +0200)
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 <stephen@networkplumber.org>
Acked-by: Feng Lu <lu.feng@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgpd.c

index 6a21b11abc02525b751b36da7473645443872ede..2fe300c5a8a49407554c8abf594a777b027953c3 100644 (file)
@@ -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);