]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Move interfaces to default before deleting
authorDon Slice <dslice@cumulusnetworks.com>
Wed, 23 Nov 2016 19:58:27 +0000 (11:58 -0800)
committerDon Slice <dslice@cumulusnetworks.com>
Wed, 17 May 2017 12:18:14 +0000 (08:18 -0400)
Encountered a crash in zebra due to getting a delete on an SVI with
VRR configured.  Since we don't actually do a delete but flag the interface
as inactive, slag VRR interfaces would remain on the vrf_iflist with a lock
count of zero, causing the crash.  Since all other interface types are moved
to the default table before deleting, doing the same thing for any interfaces
that were left in the vrf.

Testing includes manual testing, bgp-min, ospf-min, vrf-min, bgp-smoke, and ospf-smoke.
All passed (first time or on rerun) or match known failures.

Ticket: CM-13288
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
zebra/interface.c

index 39c20e62896152e1a9fa4446aa9578372ad3ccff..524183a4340f49ecf183e3a7f182acf506e8c6d6 100644 (file)
@@ -693,6 +693,10 @@ if_delete_update (struct interface *ifp)
      for setting ifindex to IFINDEX_INTERNAL after processing the
      interface deletion message. */
   ifp->ifindex = IFINDEX_INTERNAL;
+
+  /* if the ifp is in a vrf, move it to default so vrf can be deleted if desired */
+  if (ifp->vrf_id)
+    if_handle_vrf_change (ifp, VRF_DEFAULT);
 }
 
 /* VRF change for an interface */