From: vivek Date: Wed, 2 Mar 2016 07:40:14 +0000 (+0000) Subject: BGP: Handle unknown interface at delete X-Git-Tag: frr-2.0-rc1~1083 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a4499b8312f2c7fdc04d9aecbfd033ccf80eabe6;p=mirror%2Ffrr.git 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 --- 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))