VXLAN: Instance numbers now properly freed upon delete. 95/10795/1
authorJon Loeliger <jdl@netgate.com>
Fri, 23 Feb 2018 23:02:41 +0000 (17:02 -0600)
committerJon Loeliger <jdl@netgate.com>
Sat, 24 Feb 2018 00:47:20 +0000 (18:47 -0600)
Fixes a small bookkeeping oversight where the VXLAN instance
numbers were being freed erroneously by their device_instance
number rather than the correct user_instance number.

Change-Id: I08f6b2089c7a14cc8a8cb91f04f850f60ecec43b
Signed-off-by: Jon Loeliger <jdl@netgate.com>
src/vnet/vxlan/vxlan.c

index 2aec321..9732142 100644 (file)
@@ -556,7 +556,7 @@ int vnet_vxlan_add_del_tunnel
         }
 
       vnet_delete_hw_interface (vnm, t->hw_if_index);
-      hash_unset (vxm->instance_used, instance);
+      hash_unset (vxm->instance_used, t->user_instance);
 
       fib_node_deinit(&t->node);
       vec_free (t->rewrite);