aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2018-05-02 09:55:01 -0500
committerMatthew Smith <mgsmith@netgate.com>2018-05-02 10:50:16 -0500
commitec8aea1b1ed08fe6d0052ad1ed1059665479940e (patch)
tree6b78e3acae9313caa49631639f880b5a4502b6fe /src/vnet/vxlan
parent5b4a02014472113b1616214657a2de4aa584bd1d (diff)
Fix CentOS 7 build issue with vxlan
Two vxlan union/struct initializations caused gcc on CentOS 7 to puke. Modified them to make the build work again. Change-Id: Iad667444b86cfde5ee4329993b520028d3b593ad Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'src/vnet/vxlan')
-rw-r--r--src/vnet/vxlan/vxlan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/vxlan/vxlan.c b/src/vnet/vxlan/vxlan.c
index ed5406c8fc0..7516a05ab6a 100644
--- a/src/vnet/vxlan/vxlan.c
+++ b/src/vnet/vxlan/vxlan.c
@@ -221,12 +221,14 @@ vxlan_rewrite (vxlan_tunnel_t * t, bool is_ip6)
union {
ip4_vxlan_header_t h4;
ip6_vxlan_header_t h6;
- } h = {0};
+ } h;
int len = is_ip6 ? sizeof h.h6 : sizeof h.h4;
udp_header_t * udp;
vxlan_header_t * vxlan;
/* Fixed portion of the (outer) ip header */
+
+ memset (&h, 0, sizeof(h));
if (!is_ip6)
{
ip4_header_t * ip = &h.h4.ip4;
@@ -385,7 +387,7 @@ int vnet_vxlan_add_del_tunnel
return VNET_API_ERROR_INVALID_DECAP_NEXT;
pool_get_aligned (vxm->tunnels, t, CLIB_CACHE_LINE_BYTES);
- *t = (vxlan_tunnel_t){ 0 };
+ memset (t, 0, sizeof(*t));
dev_instance = t - vxm->tunnels;
/* copy from arg structure */