VXLAN:fix tunnel delete not returning sw_if_index 64/6064/2
authorEyal Bari <ebari@cisco.com>
Thu, 6 Apr 2017 00:26:59 +0000 (03:26 +0300)
committerJohn Lo <loj@cisco.com>
Thu, 6 Apr 2017 01:47:19 +0000 (01:47 +0000)
when tunnel is deleted reply should include the tunnel's sw_if_index
instead of ~0

Change-Id: Ie5e04f4feab9cf2c90f0e155ec0fb9ca839a956d
Signed-off-by: Eyal Bari <ebari@cisco.com>
src/vnet/vxlan/vxlan.c

index 58c7bec..61cb13c 100644 (file)
@@ -576,6 +576,7 @@ int vnet_vxlan_add_del_tunnel
 
       t = pool_elt_at_index (vxm->tunnels, p[0]);
 
+      sw_if_index = t->sw_if_index;
       vnet_sw_interface_set_flags (vnm, t->sw_if_index, 0 /* down */);
       vnet_sw_interface_t * si = vnet_get_sw_interface (vnm, t->sw_if_index);
       si->flags |= VNET_SW_INTERFACE_FLAG_HIDDEN;