Fix vxlan-gpe interface state dump failure
Correspond to HONEYCOMB-84 VxLAN GPE - Wrong operational data.
Change-Id: Ia1b3c3b85e4b5435b0c690a4ce9ff93c65bfee5c
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
diff --git a/vnet/vnet/vxlan-gpe/vxlan_gpe.c b/vnet/vnet/vxlan-gpe/vxlan_gpe.c
index afeaa04..f2415cb 100644
--- a/vnet/vnet/vxlan-gpe/vxlan_gpe.c
+++ b/vnet/vnet/vxlan-gpe/vxlan_gpe.c
@@ -308,6 +308,8 @@
t->hw_if_index = hw_if_index;
t->sw_if_index = sw_if_index = hi->sw_if_index;
+ vec_validate_init_empty (gm->tunnel_index_by_sw_if_index, sw_if_index, ~0);
+ gm->tunnel_index_by_sw_if_index[sw_if_index] = t - gm->tunnels;
vnet_sw_interface_set_flags (vnm, hi->sw_if_index,
VNET_SW_INTERFACE_FLAG_ADMIN_UP);
@@ -323,6 +325,8 @@
vnet_sw_interface_set_flags (vnm, t->sw_if_index, 0 /* down */);
vec_add1 (gm->free_vxlan_gpe_tunnel_hw_if_indices, t->hw_if_index);
+ gm->tunnel_index_by_sw_if_index[t->sw_if_index] = ~0;
+
if (!a->is_ip6)
{
hp = hash_get_pair (gm->vxlan4_gpe_tunnel_by_key, &key4);