From ae4d7bb5536244a1bbf53b1ec5321f37d11af007 Mon Sep 17 00:00:00 2001 From: Manish Date: Mon, 27 Feb 2017 15:02:35 +0530 Subject: [PATCH] Agent crash@ route notify Agent channel is deleted and notify is received on same. It can happen that notify was enqueued before unregister/delete of channel. Solution is to ignore if any notify comes for inactive channel. Same is present in handling of vrf notify (controller_vrf_export). Change-Id: I1a791b5411841c5a72b7f83b414992a014e2b6f7 Closes-bug: #1668205 --- src/vnsw/agent/controller/controller_export.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vnsw/agent/controller/controller_export.cc b/src/vnsw/agent/controller/controller_export.cc index 80b07816116..a4f149f848a 100644 --- a/src/vnsw/agent/controller/controller_export.cc +++ b/src/vnsw/agent/controller/controller_export.cc @@ -131,6 +131,11 @@ void RouteExport::Notify(const Agent *agent, return; } + //If channel is no more active, ignore any updates. + //It may happen that notify is enqueued before channel is removed. + if (!AgentXmppChannel::IsBgpPeerActive(agent, bgp_xmpp_peer)) + return; + if (route->is_multicast()) { MulticastNotify(bgp_xmpp_peer, associate, partition, e); } else {