api: initialize sw_if_index earlier in vxlan_gbp_tunnel_add_del
In the case of an error, it is uninitialized.
Type: fix
@@ -92,6 +92,7 @@ static void vl_api_vxlan_gbp_tunnel_add_del_t_handler
ip46_address_t src, dst;
ip46_type_t itype;
int rv = 0;
+ u32 sw_if_index = ~0;
u32 fib_index;
itype = ip_address_decode (&mp->tunnel.src, &src);
@@ -135,7 +136,6 @@ static void vl_api_vxlan_gbp_tunnel_add_del_t_handler
goto out;
}
- u32 sw_if_index = ~0;
rv = vnet_vxlan_gbp_tunnel_add_del (&a, &sw_if_index);
out:
