Fix VXLAN tunnel delete crash 44/3544/1
authorJohn Lo <loj@cisco.com>
Mon, 24 Oct 2016 16:13:27 +0000 (12:13 -0400)
committerJohn Lo <loj@cisco.com>
Mon, 24 Oct 2016 16:13:27 +0000 (12:13 -0400)
Change-Id: I610648f28b7504798da9e377ea099629aa7a5150
Signed-off-by: John Lo <loj@cisco.com>
vnet/vnet/vxlan/vxlan.c

index 5b521db..b90704a 100644 (file)
@@ -369,13 +369,13 @@ int vnet_vxlan_add_del_tunnel
       if (!a->is_ip6)
         {
           hash_unset (vxm->vxlan4_tunnel_by_key, key4.as_u64);
-          ip4_sw_interface_enable_disable(sw_if_index, 1);
+          ip4_sw_interface_enable_disable(t->sw_if_index, 1);
        }
       else
         {
          hash_unset_mem (vxm->vxlan6_tunnel_by_key, t->key6);
          clib_mem_free (t->key6);
-          ip6_sw_interface_enable_disable(sw_if_index, 1);
+          ip6_sw_interface_enable_disable(t->sw_if_index, 1);
        }
       vec_free (t->rewrite);
       pool_put (vxm->tunnels, t);