This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 8d6733aad3e23cbb3813ee7161edb7ae7f9402df (commit) via df4b6d7826fdc942c9709489acea9c2a9ab033f2 (commit) via 37895b64fbea7250f8c2fb07ab6568f96426e2f8 (commit) from f95ac4d08f59722e10524e3bbe7385044aa2b565 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 8d6733aad3e23cbb3813ee7161edb7ae7f9402df Author: Petri Savolainen petri.savolainen@nokia.com Date: Wed Oct 2 10:17:24 2019 +0300
configure: suppress pointer to packed structure warnings
Fix GCC-9 build by handling "pointer to packed member of a struct" warnings not as errors. These warnings are generated e.g. when taking pointers to protocol header structures, which are defined with packed attribute. These structures are naturally aligned, so these warnings can be ignored.
chksum.c: In function odph_process_l4_hdr: chksum.c:133:43: error: taking address of packed member of struct <anonymous> may result in an unaligned pointer value [-Werror=address-of-packed-member] pkt_chksum_ptr = (uint16_t *)(void *)&udp_hdr_ptr->chksum;
^~~~~~~~~~~~~~~~~~~~
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com
diff --git a/configure.ac b/configure.ac index 857905c3d..69474878d 100644 --- a/configure.ac +++ b/configure.ac @@ -112,6 +112,7 @@ AC_TYPE_UINT64_T ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror" ODP_CXXFLAGS="$ODP_CXXFLAGS -W -Wall -Werror"
+# Additional warnings: ODP_CHECK_CFLAG([-Wstrict-prototypes]) ODP_CHECK_CFLAG([-Wmissing-prototypes]) ODP_CHECK_CFLAG([-Wmissing-declarations]) @@ -127,6 +128,11 @@ ODP_CHECK_CFLAG([-Wwrite-strings]) ODP_CHECK_CFLAG([-Wformat-truncation=0]) ODP_CHECK_CFLAG([-Wformat-overflow=0])
+# Suppressed warnings: +# GCC-9 warns about taking pointers to packed structure fields (e.g. protocol +# header structures). Generate only warnings on those, not errors. +ODP_CHECK_CFLAG([-Wno-error=address-of-packed-member]) + ODP_CFLAGS="$ODP_CFLAGS -std=c99" ODP_CXXFLAGS="$ODP_CXXFLAGS -std=c++11"
commit df4b6d7826fdc942c9709489acea9c2a9ab033f2 Author: Petri Savolainen petri.savolainen@nokia.com Date: Wed Oct 2 14:32:57 2019 +0300
validation: ipsec: use memset zero instead of empty brackets
Use memset to zero instead of "struct foo = {};". This allows "missing initializer for field" warnings to be enabled again.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com
diff --git a/example/ipfragreass/odp_ipfragreass.c b/example/ipfragreass/odp_ipfragreass.c index baf8b13dc..00e7b8643 100644 --- a/example/ipfragreass/odp_ipfragreass.c +++ b/example/ipfragreass/odp_ipfragreass.c @@ -230,7 +230,7 @@ int main(void) odp_pool_t fragment_pool; odp_shm_t shm; odp_cpumask_t cpumask; - odph_odpthread_t threads[MAX_WORKERS] = {}; + odph_odpthread_t threads[MAX_WORKERS]; odph_odpthread_params_t thread_params; odp_packet_t dequeued_pkts[NUM_PACKETS]; odp_event_t ev; @@ -242,6 +242,7 @@ int main(void) int num_workers = MAX_WORKERS; int reassembled;
+ memset(&threads, 0, sizeof(threads)); init(&instance, &fragment_pool, &shm, &cpumask, &num_workers);
/* Packet generation & fragmentation */ diff --git a/test/validation/api/ipsec/Makefile.am b/test/validation/api/ipsec/Makefile.am index a9caba17c..e2c633e0d 100644 --- a/test/validation/api/ipsec/Makefile.am +++ b/test/validation/api/ipsec/Makefile.am @@ -1,7 +1,5 @@ include ../Makefile.inc
-AM_CPPFLAGS += -Wno-error=missing-field-initializers - noinst_LTLIBRARIES = libtestipsec.la libtestipsec_la_SOURCES = \ test_vectors.h \ diff --git a/test/validation/api/ipsec/ipsec_test_in.c b/test/validation/api/ipsec/ipsec_test_in.c index 0e23c3681..632e2ec8b 100644 --- a/test/validation/api/ipsec/ipsec_test_in.c +++ b/test/validation/api/ipsec/ipsec_test_in.c @@ -42,10 +42,12 @@ static void test_in_ipv4_ah_sha256(void)
static void test_in_ipv4_ah_sha256_tun_ipv4(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, true, 123, &tunnel, ODP_CIPHER_ALG_NULL, NULL, @@ -75,10 +77,12 @@ static void test_in_ipv4_ah_sha256_tun_ipv4(void)
static void test_in_ipv4_ah_sha256_tun_ipv6(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, true, 123, &tunnel, ODP_CIPHER_ALG_NULL, NULL, @@ -335,10 +339,12 @@ static void test_in_ipv4_esp_null_sha256_lookup(void)
static void test_in_ipv4_esp_null_sha256_tun_ipv4(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, false, 123, &tunnel, ODP_CIPHER_ALG_NULL, NULL, @@ -368,10 +374,12 @@ static void test_in_ipv4_esp_null_sha256_tun_ipv4(void)
static void test_in_ipv4_esp_null_sha256_tun_ipv6(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, false, 123, &tunnel, ODP_CIPHER_ALG_NULL, NULL, @@ -966,10 +974,12 @@ static void test_in_ipv4_rfc3602_6_esp(void)
static void test_in_ipv4_rfc3602_7_esp(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, false, 0x8765, &tunnel, ODP_CIPHER_ALG_AES_CBC, &key_rfc3602_2, @@ -999,10 +1009,12 @@ static void test_in_ipv4_rfc3602_7_esp(void)
static void test_in_ipv4_rfc3602_8_esp(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, false, 0x8765, &tunnel, ODP_CIPHER_ALG_AES_CBC, &key_rfc3602_2, @@ -1032,10 +1044,12 @@ static void test_in_ipv4_rfc3602_8_esp(void)
static void test_in_ipv4_mcgrew_gcm_2_esp(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, false, 0xa5f8, &tunnel, ODP_CIPHER_ALG_AES_GCM, &key_mcgrew_gcm_2, @@ -1065,10 +1079,12 @@ static void test_in_ipv4_mcgrew_gcm_2_esp(void)
static void test_in_ipv4_mcgrew_gcm_3_esp(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, false, 0x4a2cbfe3, &tunnel, ODP_CIPHER_ALG_AES_GCM, &key_mcgrew_gcm_3, @@ -1098,10 +1114,12 @@ static void test_in_ipv4_mcgrew_gcm_3_esp(void)
static void test_in_ipv4_mcgrew_gcm_4_esp(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, false, 0x00000000, &tunnel, ODP_CIPHER_ALG_AES_GCM, &key_mcgrew_gcm_4, @@ -1131,10 +1149,12 @@ static void test_in_ipv4_mcgrew_gcm_4_esp(void)
static void test_in_ipv4_mcgrew_gcm_12_esp(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + /* This test will not work properly inbound inline mode. * Packet might be dropped and we will not check for that. */ if (suite_context.inbound_op_mode == ODP_IPSEC_OP_MODE_INLINE) @@ -1201,10 +1221,12 @@ static void test_in_ipv4_mcgrew_gcm_12_esp_notun(void)
static void test_in_ipv4_mcgrew_gcm_15_esp(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, false, 0x00004321, &tunnel, ODP_CIPHER_ALG_NULL, NULL, @@ -1234,10 +1256,12 @@ static void test_in_ipv4_mcgrew_gcm_15_esp(void)
static void test_in_ipv4_rfc7634_chacha(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, false, 0x01020304, &tunnel, ODP_CIPHER_ALG_CHACHA20_POLY1305, &key_rfc7634, @@ -1363,10 +1387,12 @@ static void test_in_ipv6_ah_sha256(void)
static void test_in_ipv6_ah_sha256_tun_ipv4(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, true, 123, &tunnel, ODP_CIPHER_ALG_NULL, NULL, @@ -1396,10 +1422,12 @@ static void test_in_ipv6_ah_sha256_tun_ipv4(void)
static void test_in_ipv6_ah_sha256_tun_ipv6(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, true, 123, &tunnel, ODP_CIPHER_ALG_NULL, NULL, @@ -1461,10 +1489,12 @@ static void test_in_ipv6_esp_null_sha256(void)
static void test_in_ipv6_esp_null_sha256_tun_ipv4(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, false, 123, &tunnel, ODP_CIPHER_ALG_NULL, NULL, @@ -1494,10 +1524,12 @@ static void test_in_ipv6_esp_null_sha256_tun_ipv4(void)
static void test_in_ipv6_esp_null_sha256_tun_ipv6(void) { - odp_ipsec_tunnel_param_t tunnel = {}; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa;
+ memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + ipsec_sa_param_fill(¶m, true, false, 123, &tunnel, ODP_CIPHER_ALG_NULL, NULL,
commit 37895b64fbea7250f8c2fb07ab6568f96426e2f8 Author: Petri Savolainen petri.savolainen@nokia.com Date: Wed Oct 2 16:43:54 2019 +0300
validation: ipsec: memset struct fields to zero
Initialize all struct fields to zero with memset instead of struct initializer. This avoid build problems with some old compilers.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com
diff --git a/test/validation/api/ipsec/ipsec_test_out.c b/test/validation/api/ipsec/ipsec_test_out.c index 48a6b80cd..36de0cca1 100644 --- a/test/validation/api/ipsec/ipsec_test_out.c +++ b/test/validation/api/ipsec/ipsec_test_out.c @@ -45,16 +45,17 @@ static void test_out_ipv4_ah_sha256(void)
static void test_out_ipv4_ah_sha256_tun_ipv4(void) { - uint32_t src = IPV4ADDR(10, 0, 111, 2); - uint32_t dst = IPV4ADDR(10, 0, 222, 2); - odp_ipsec_tunnel_param_t tunnel = { - .type = ODP_IPSEC_TUNNEL_IPV4, - .ipv4.src_addr = &src, - .ipv4.dst_addr = &dst, - .ipv4.ttl = 64, - }; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa; + uint32_t src = IPV4ADDR(10, 0, 111, 2); + uint32_t dst = IPV4ADDR(10, 0, 222, 2); + + memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + tunnel.type = ODP_IPSEC_TUNNEL_IPV4; + tunnel.ipv4.src_addr = &src; + tunnel.ipv4.dst_addr = &dst; + tunnel.ipv4.ttl = 64;
ipsec_sa_param_fill(¶m, false, true, 123, &tunnel, @@ -83,6 +84,9 @@ static void test_out_ipv4_ah_sha256_tun_ipv4(void)
static void test_out_ipv4_ah_sha256_tun_ipv6(void) { + odp_ipsec_tunnel_param_t tunnel; + odp_ipsec_sa_param_t param; + odp_ipsec_sa_t sa; uint8_t src[16] = { 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x43, 0xff, 0xfe, 0x4a, 0xd7, 0x0a, @@ -91,14 +95,12 @@ static void test_out_ipv4_ah_sha256_tun_ipv6(void) 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, }; - odp_ipsec_tunnel_param_t tunnel = { - .type = ODP_IPSEC_TUNNEL_IPV6, - .ipv6.src_addr = src, - .ipv6.dst_addr = dst, - .ipv6.hlimit = 64, - }; - odp_ipsec_sa_param_t param; - odp_ipsec_sa_t sa; + + memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + tunnel.type = ODP_IPSEC_TUNNEL_IPV6; + tunnel.ipv6.src_addr = src; + tunnel.ipv6.dst_addr = dst; + tunnel.ipv6.hlimit = 64;
ipsec_sa_param_fill(¶m, false, true, 123, &tunnel, @@ -157,16 +159,17 @@ static void test_out_ipv4_esp_null_sha256(void)
static void test_out_ipv4_esp_null_sha256_tun_ipv4(void) { - uint32_t src = IPV4ADDR(10, 0, 111, 2); - uint32_t dst = IPV4ADDR(10, 0, 222, 2); - odp_ipsec_tunnel_param_t tunnel = { - .type = ODP_IPSEC_TUNNEL_IPV4, - .ipv4.src_addr = &src, - .ipv4.dst_addr = &dst, - .ipv4.ttl = 64, - }; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa; + uint32_t src = IPV4ADDR(10, 0, 111, 2); + uint32_t dst = IPV4ADDR(10, 0, 222, 2); + + memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + tunnel.type = ODP_IPSEC_TUNNEL_IPV4; + tunnel.ipv4.src_addr = &src; + tunnel.ipv4.dst_addr = &dst; + tunnel.ipv4.ttl = 64;
ipsec_sa_param_fill(¶m, false, false, 123, &tunnel, @@ -196,6 +199,9 @@ static void test_out_ipv4_esp_null_sha256_tun_ipv4(void)
static void test_out_ipv4_esp_null_sha256_tun_ipv6(void) { + odp_ipsec_tunnel_param_t tunnel; + odp_ipsec_sa_param_t param; + odp_ipsec_sa_t sa; uint8_t src[16] = { 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x43, 0xff, 0xfe, 0x4a, 0xd7, 0x0a, @@ -204,14 +210,12 @@ static void test_out_ipv4_esp_null_sha256_tun_ipv6(void) 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, }; - odp_ipsec_tunnel_param_t tunnel = { - .type = ODP_IPSEC_TUNNEL_IPV6, - .ipv6.src_addr = src, - .ipv6.dst_addr = dst, - .ipv6.hlimit = 64, - }; - odp_ipsec_sa_param_t param; - odp_ipsec_sa_t sa; + + memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + tunnel.type = ODP_IPSEC_TUNNEL_IPV6; + tunnel.ipv6.src_addr = src; + tunnel.ipv6.dst_addr = dst; + tunnel.ipv6.hlimit = 64;
ipsec_sa_param_fill(¶m, false, false, 123, &tunnel, @@ -770,16 +774,17 @@ static void test_out_ipv6_ah_sha256(void)
static void test_out_ipv6_ah_sha256_tun_ipv4(void) { - uint32_t src = IPV4ADDR(10, 0, 111, 2); - uint32_t dst = IPV4ADDR(10, 0, 222, 2); - odp_ipsec_tunnel_param_t tunnel = { - .type = ODP_IPSEC_TUNNEL_IPV4, - .ipv4.src_addr = &src, - .ipv4.dst_addr = &dst, - .ipv4.ttl = 64, - }; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa; + uint32_t src = IPV4ADDR(10, 0, 111, 2); + uint32_t dst = IPV4ADDR(10, 0, 222, 2); + + memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + tunnel.type = ODP_IPSEC_TUNNEL_IPV4; + tunnel.ipv4.src_addr = &src; + tunnel.ipv4.dst_addr = &dst; + tunnel.ipv4.ttl = 64;
ipsec_sa_param_fill(¶m, false, true, 123, &tunnel, @@ -808,6 +813,9 @@ static void test_out_ipv6_ah_sha256_tun_ipv4(void)
static void test_out_ipv6_ah_sha256_tun_ipv6(void) { + odp_ipsec_tunnel_param_t tunnel; + odp_ipsec_sa_param_t param; + odp_ipsec_sa_t sa; uint8_t src[16] = { 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x43, 0xff, 0xfe, 0x4a, 0xd7, 0x0a, @@ -816,14 +824,12 @@ static void test_out_ipv6_ah_sha256_tun_ipv6(void) 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, }; - odp_ipsec_tunnel_param_t tunnel = { - .type = ODP_IPSEC_TUNNEL_IPV6, - .ipv6.src_addr = src, - .ipv6.dst_addr = dst, - .ipv6.hlimit = 64, - }; - odp_ipsec_sa_param_t param; - odp_ipsec_sa_t sa; + + memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + tunnel.type = ODP_IPSEC_TUNNEL_IPV6; + tunnel.ipv6.src_addr = src; + tunnel.ipv6.dst_addr = dst; + tunnel.ipv6.hlimit = 64;
ipsec_sa_param_fill(¶m, false, true, 123, &tunnel, @@ -882,16 +888,17 @@ static void test_out_ipv6_esp_null_sha256(void)
static void test_out_ipv6_esp_null_sha256_tun_ipv4(void) { - uint32_t src = IPV4ADDR(10, 0, 111, 2); - uint32_t dst = IPV4ADDR(10, 0, 222, 2); - odp_ipsec_tunnel_param_t tunnel = { - .type = ODP_IPSEC_TUNNEL_IPV4, - .ipv4.src_addr = &src, - .ipv4.dst_addr = &dst, - .ipv4.ttl = 64, - }; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa; + uint32_t src = IPV4ADDR(10, 0, 111, 2); + uint32_t dst = IPV4ADDR(10, 0, 222, 2); + + memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + tunnel.type = ODP_IPSEC_TUNNEL_IPV4; + tunnel.ipv4.src_addr = &src; + tunnel.ipv4.dst_addr = &dst; + tunnel.ipv4.ttl = 64;
ipsec_sa_param_fill(¶m, false, false, 123, &tunnel, @@ -921,6 +928,9 @@ static void test_out_ipv6_esp_null_sha256_tun_ipv4(void)
static void test_out_ipv6_esp_null_sha256_tun_ipv6(void) { + odp_ipsec_tunnel_param_t tunnel; + odp_ipsec_sa_param_t param; + odp_ipsec_sa_t sa; uint8_t src[16] = { 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x43, 0xff, 0xfe, 0x4a, 0xd7, 0x0a, @@ -929,14 +939,12 @@ static void test_out_ipv6_esp_null_sha256_tun_ipv6(void) 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, }; - odp_ipsec_tunnel_param_t tunnel = { - .type = ODP_IPSEC_TUNNEL_IPV6, - .ipv6.src_addr = &src, - .ipv6.dst_addr = &dst, - .ipv6.hlimit = 64, - }; - odp_ipsec_sa_param_t param; - odp_ipsec_sa_t sa; + + memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + tunnel.type = ODP_IPSEC_TUNNEL_IPV6; + tunnel.ipv6.src_addr = &src; + tunnel.ipv6.dst_addr = &dst; + tunnel.ipv6.hlimit = 64;
ipsec_sa_param_fill(¶m, false, false, 123, &tunnel, @@ -997,17 +1005,18 @@ static void test_out_ipv6_esp_udp_null_sha256(void)
static void test_out_dummy_esp_null_sha256_tun_ipv4(void) { - uint32_t src = IPV4ADDR(10, 0, 111, 2); - uint32_t dst = IPV4ADDR(10, 0, 222, 2); - odp_ipsec_tunnel_param_t tunnel = { - .type = ODP_IPSEC_TUNNEL_IPV4, - .ipv4.src_addr = &src, - .ipv4.dst_addr = &dst, - .ipv4.ttl = 64, - }; + odp_ipsec_tunnel_param_t tunnel; odp_ipsec_sa_param_t param; odp_ipsec_sa_t sa; odp_ipsec_sa_t sa2; + uint32_t src = IPV4ADDR(10, 0, 111, 2); + uint32_t dst = IPV4ADDR(10, 0, 222, 2); + + memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + tunnel.type = ODP_IPSEC_TUNNEL_IPV4; + tunnel.ipv4.src_addr = &src; + tunnel.ipv4.dst_addr = &dst; + tunnel.ipv4.ttl = 64;
/* This test will not work properly inbound inline mode. * Packet might be dropped and we will not check for that. */ @@ -1073,6 +1082,10 @@ static void test_out_dummy_esp_null_sha256_tun_ipv4(void)
static void test_out_dummy_esp_null_sha256_tun_ipv6(void) { + odp_ipsec_tunnel_param_t tunnel; + odp_ipsec_sa_param_t param; + odp_ipsec_sa_t sa; + odp_ipsec_sa_t sa2; uint8_t src[16] = { 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x43, 0xff, 0xfe, 0x4a, 0xd7, 0x0a, @@ -1081,15 +1094,12 @@ static void test_out_dummy_esp_null_sha256_tun_ipv6(void) 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, }; - odp_ipsec_tunnel_param_t tunnel = { - .type = ODP_IPSEC_TUNNEL_IPV6, - .ipv6.src_addr = src, - .ipv6.dst_addr = dst, - .ipv6.hlimit = 64, - }; - odp_ipsec_sa_param_t param; - odp_ipsec_sa_t sa; - odp_ipsec_sa_t sa2; + + memset(&tunnel, 0, sizeof(odp_ipsec_tunnel_param_t)); + tunnel.type = ODP_IPSEC_TUNNEL_IPV6; + tunnel.ipv6.src_addr = src; + tunnel.ipv6.dst_addr = dst; + tunnel.ipv6.hlimit = 64;
/* This test will not work properly inbound inline mode. * Packet might be dropped and we will not check for that. */
-----------------------------------------------------------------------
Summary of changes: configure.ac | 6 + example/ipfragreass/odp_ipfragreass.c | 3 +- test/validation/api/ipsec/Makefile.am | 2 - test/validation/api/ipsec/ipsec_test_in.c | 64 ++++++++--- test/validation/api/ipsec/ipsec_test_out.c | 172 +++++++++++++++-------------- 5 files changed, 147 insertions(+), 100 deletions(-)
hooks/post-receive