On interface deletion - make sure any vlan qinq table is cleared
Change-Id: Ie9bb1cfce2369b448ca55a21b2f8b8bbbb81c59c
Signed-off-by: John Lo <loj@cisco.com>
diff --git a/src/vnet/ethernet/interface.c b/src/vnet/ethernet/interface.c
index d44a8a8..e0d1295 100644
--- a/src/vnet/ethernet/interface.c
+++ b/src/vnet/ethernet/interface.c
@@ -342,6 +342,7 @@
if (vlan_table->vlans[idx].qinqs)
{
pool_put_index (em->qinq_pool, vlan_table->vlans[idx].qinqs);
+ vlan_table->vlans[idx].qinqs = 0;
}
}
pool_put_index (em->vlan_pool, main_intf->dot1q_vlans);
@@ -355,6 +356,7 @@
if (vlan_table->vlans[idx].qinqs)
{
pool_put_index (em->qinq_pool, vlan_table->vlans[idx].qinqs);
+ vlan_table->vlans[idx].qinqs = 0;
}
}
pool_put_index (em->vlan_pool, main_intf->dot1ad_vlans);