+ if (a->is_l3)
+ t->hw_if_index =
+ vnet_register_interface (vnm, vxlan_device_class.index, dev_instance,
+ vxlan_hw_class.index, dev_instance);
+ else
+ {
+ f64 now = vlib_time_now (vm);
+ u32 rnd;
+ rnd = (u32) (now * 1e6);
+ rnd = random_u32 (&rnd);
+ memcpy (hw_addr + 2, &rnd, sizeof (rnd));
+ hw_addr[0] = 2;
+ hw_addr[1] = 0xfe;
+ 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;
+ }
+ }
+