summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorDon Slice <dslice@cumulusnetworks.com>2016-11-23 20:58:27 +0100
committerDon Slice <dslice@cumulusnetworks.com>2017-05-17 14:18:14 +0200
commit9c5cd62f08f5e0d77a6474e15a49dcf8bd8ce21c (patch)
tree7ca8fc0896c181af81331bcd0b947f0d90db66ff /zebra
parentMerge pull request #553 from donaldsharp/missed_2.0 (diff)
downloadfrr-9c5cd62f08f5e0d77a6474e15a49dcf8bd8ce21c.tar.xz
frr-9c5cd62f08f5e0d77a6474e15a49dcf8bd8ce21c.zip
zebra: Move interfaces to default before deleting
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
Diffstat (limited to 'zebra')
-rw-r--r--zebra/interface.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 39c20e628..524183a43 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -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 */