aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2018-10-04 16:22:21 -0400
committerDamjan Marion <dmarion@me.com>2018-10-05 06:25:32 +0000
commitd63abff00f2aa234242a76aa0a4b5a38dfe1aee2 (patch)
tree009ec4ccd240f28f51f1e64e3aeb45733dd1a9af /src/vnet/ethernet
parent412ecd320acb9add4a22426b8ed4e035eb08ebc4 (diff)
On interface deletion - make sure any vlan qinq table is cleared
Change-Id: Ie9bb1cfce2369b448ca55a21b2f8b8bbbb81c59c Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/vnet/ethernet')
-rw-r--r--src/vnet/ethernet/interface.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/ethernet/interface.c b/src/vnet/ethernet/interface.c
index d44a8a8ecb0..e0d1295f69d 100644
--- a/src/vnet/ethernet/interface.c
+++ b/src/vnet/ethernet/interface.c
@@ -342,6 +342,7 @@ ethernet_delete_interface (vnet_main_t * vnm, u32 hw_if_index)
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 @@ ethernet_delete_interface (vnet_main_t * vnm, u32 hw_if_index)
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);