summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-03-23 13:32:50 +0100
committerMarco Varlese <marco.varlese@suse.de>2018-03-26 06:04:56 +0000
commite5454577961aabfec124f19dc9264897927716f5 (patch)
tree7a5bd60092477f60ba74009d27ea29dcfe31833e
parentae389bc4a10180aa35010725d525fc440da6f67e (diff)
IPSEC_AH: broken initialization (VPP-1208)
The init-path for IPSEC_AH where the CTX gets initialized is broken since the for-loop never executes due to the wrong usage of tm->n_vlib_mains which being subtracted by 1. Change-Id: I4d967f52cd3ca061aa60d824d65f446e06162403 Signed-off-by: Marco Varlese <marco.varlese@suse.com> (cherry picked from commit 4631610a20e6ae3181cb517db27a93b2a3e07eff)
-rw-r--r--src/vnet/ipsec/esp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/ipsec/esp.h b/src/vnet/ipsec/esp.h
index 10f2f2df88a..8f7f8fab381 100644
--- a/src/vnet/ipsec/esp.h
+++ b/src/vnet/ipsec/esp.h
@@ -305,7 +305,7 @@ ipsec_proto_init ()
CLIB_CACHE_LINE_BYTES);
int thread_id;
- for (thread_id = 0; thread_id < tm->n_vlib_mains - 1; thread_id++)
+ for (thread_id = 0; thread_id < tm->n_vlib_mains; thread_id++)
{
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
em->per_thread_data[thread_id].encrypt_ctx = EVP_CIPHER_CTX_new ();