aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-06-25 17:57:31 -0400
committerNeale Ranns <nranns@cisco.com>2019-06-26 08:50:08 +0000
commitaaba610077c21537c775a633d7f64dad239783cb (patch)
treedab97ed61e8cefa6486a8b66a800712e9597925b /src
parent4845c696d9975e9748cb80f4113472b7de4096a7 (diff)
api: initialize sw_if_index earlier in vxlan_gbp_tunnel_add_del
In the case of an error, it is uninitialized. Type: fix Change-Id: Ib88fb997e5eef410c1cd970674d9385575f30366 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/vxlan-gbp/vxlan_gbp_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/vxlan-gbp/vxlan_gbp_api.c b/src/vnet/vxlan-gbp/vxlan_gbp_api.c
index aff5f841909..08e2a7c279f 100644
--- a/src/vnet/vxlan-gbp/vxlan_gbp_api.c
+++ b/src/vnet/vxlan-gbp/vxlan_gbp_api.c
@@ -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: