summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2016-03-02 07:40:14 +0000
committervivek <vivek@cumulusnetworks.com>2016-03-02 07:40:14 +0000
commita4499b8312f2c7fdc04d9aecbfd033ccf80eabe6 (patch)
tree6382ee6fd600c82db9ac02cd793bb84feb641b40
parent4b33b75a01b38108f99ef633e85d9bf964a33d3f (diff)
BGP: Handle unknown interface at delete
When BGP deals with interfaces at a VRF-level, it may get an interface delete for a VRF which it has just de-registered, so it may not be able to locate the interface. This is no longer an error, so handle this in the message processing. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Ticket: CM-9462 Reviewed By: None (trivial) Testing Done: None
-rw-r--r--bgpd/bgp_zebra.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 720972e3ac..0e83152397 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -316,6 +316,9 @@ bgp_interface_delete (int command, struct zclient *zclient,
s = zclient->ibuf;
ifp = zebra_interface_state_read (s, vrf_id);
+ if (! ifp) /* This may happen if we've just unregistered for a VRF. */
+ return 0;
+
ifp->ifindex = IFINDEX_INTERNAL;
if (BGP_DEBUG (zebra, ZEBRA))