aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/esp_encrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ipsec/esp_encrypt.c')
-rw-r--r--src/vnet/ipsec/esp_encrypt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/ipsec/esp_encrypt.c b/src/vnet/ipsec/esp_encrypt.c
index 5f633011491..4291e946b36 100644
--- a/src/vnet/ipsec/esp_encrypt.c
+++ b/src/vnet/ipsec/esp_encrypt.c
@@ -88,11 +88,11 @@ format_esp_encrypt_trace (u8 * s, va_list * args)
}
always_inline void
-esp_encrypt_cbc (ipsec_crypto_alg_t alg,
+esp_encrypt_cbc (vlib_main_t * vm, ipsec_crypto_alg_t alg,
u8 * in, u8 * out, size_t in_len, u8 * key, u8 * iv)
{
ipsec_proto_main_t *em = &ipsec_proto_main;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
EVP_CIPHER_CTX *ctx = em->per_thread_data[thread_index].encrypt_ctx;
#else
@@ -130,7 +130,7 @@ esp_encrypt_node_fn (vlib_main_t * vm,
ipsec_main_t *im = &ipsec_main;
ipsec_proto_main_t *em = &ipsec_proto_main;
u32 *recycle = 0;
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
ipsec_alloc_empty_buffers (vm, im);
@@ -361,7 +361,7 @@ esp_encrypt_node_fn (vlib_main_t * vm,
em->ipsec_proto_main_crypto_algs[sa0->
crypto_alg].iv_size);
- esp_encrypt_cbc (sa0->crypto_alg,
+ esp_encrypt_cbc (vm, sa0->crypto_alg,
(u8 *) vlib_buffer_get_current (i_b0),
(u8 *) vlib_buffer_get_current (o_b0) +
ip_udp_hdr_size + sizeof (esp_header_t) +