summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan/vxlan.c
diff options
context:
space:
mode:
authorRay Kinsella <mdr@ashroe.eu>2021-01-28 17:09:45 +0000
committerRay Kinsella <mdr@ashroe.eu>2021-02-03 17:28:52 +0000
commit15cb3dac874bcec701a33723467b81a53a6fc4d3 (patch)
treed484c18fe0211f53917e85a6c6c4e810d6573cd0 /src/vnet/vxlan/vxlan.c
parent9302cfea9ded05f01fb84a77d248b8787ec2cac5 (diff)
vxlan: fix interface naming
Previous commit broke naming of vxlan interfaces. Type:fix Fixes:a4b0541f6 Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I5e304821be73547b4e47c35ad9632283f153830f
Diffstat (limited to 'src/vnet/vxlan/vxlan.c')
-rw-r--r--src/vnet/vxlan/vxlan.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/vnet/vxlan/vxlan.c b/src/vnet/vxlan/vxlan.c
index 300aae4e0ba..b2329d815ff 100644
--- a/src/vnet/vxlan/vxlan.c
+++ b/src/vnet/vxlan/vxlan.c
@@ -440,20 +440,22 @@ int vnet_vxlan_add_del_tunnel
hw_addr[0] = 2;
hw_addr[1] = 0xfe;
+ hash_set (vxm->instance_used, user_instance, 1);
+
+ t->dev_instance = dev_instance; /* actual */
+ t->user_instance = user_instance; /* name */
+ t->flow_index = ~0;
+
if (ethernet_register_interface (vnm, vxlan_device_class.index,
dev_instance, hw_addr, &t->hw_if_index,
vxlan_eth_flag_change))
{
+ hash_unset (vxm->instance_used, t->user_instance);
+
pool_put (vxm->tunnels, t);
return VNET_API_ERROR_SYSCALL_ERROR_2;
}
- hash_set (vxm->instance_used, user_instance, 1);
-
- t->dev_instance = dev_instance; /* actual */
- t->user_instance = user_instance; /* name */
- t->flow_index = ~0;
-
vnet_hw_interface_t *hi = vnet_get_hw_interface (vnm, t->hw_if_index);
/* Set vxlan tunnel output node */