From a4499b8312f2c7fdc04d9aecbfd033ccf80eabe6 Mon Sep 17 00:00:00 2001 From: vivek Date: Wed, 2 Mar 2016 07:40:14 +0000 Subject: [PATCH] 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 Ticket: CM-9462 Reviewed By: None (trivial) Testing Done: None --- bgpd/bgp_zebra.c | 3 +++ 1 file changed, 3 insertions(+) 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)) -- 2.39.5