summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongjun Ni <hongjun.ni@intel.com>2016-06-16 20:18:15 +0800
committerHongjun Ni <hongjun.ni@intel.com>2016-06-16 20:18:15 +0800
commitc0959c9c47fe056a35fb33ef70b23087172a54ee (patch)
treea38895df916358cbc6d263f2d3205e088d25420c
parent445d6658d0bbfbea42514cd24de8eab0db493d83 (diff)
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>
-rw-r--r--vnet/vnet/vxlan-gpe/vxlan_gpe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vnet/vnet/vxlan-gpe/vxlan_gpe.c b/vnet/vnet/vxlan-gpe/vxlan_gpe.c
index afeaa042ff5..f2415cbbe99 100644
--- a/vnet/vnet/vxlan-gpe/vxlan_gpe.c
+++ b/vnet/vnet/vxlan-gpe/vxlan_gpe.c
@@ -308,6 +308,8 @@ int vnet_vxlan_gpe_add_del_tunnel
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 @@ int vnet_vxlan_gpe_add_del_tunnel
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);