summaryrefslogtreecommitdiffstats
path: root/bgpd/bgpd.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2010-01-13 01:32:39 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2014-06-03 15:30:22 +0200
commitd9d4ae5157207b9b8bdb167983519a7ffb860f2c (patch)
tree8919a83dcb99aac5fa0141f873525517d5e3b7ac /bgpd/bgpd.c
parentbgpd: efficient NLRI packing for AFs != ipv4-unicast (diff)
downloadfrr-d9d4ae5157207b9b8bdb167983519a7ffb860f2c.tar.xz
frr-d9d4ae5157207b9b8bdb167983519a7ffb860f2c.zip
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 <stephen@networkplumber.org> Acked-by: Feng Lu <lu.feng@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r--bgpd/bgpd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 6a21b11ab..2fe300c5a 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);