summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/esp_encrypt.c
diff options
context:
space:
mode:
author“mukeshyadav1984” <mukyadav@cisco.com>2017-11-23 02:39:33 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-28 12:26:30 +0000
commit430ac939d115b59e3f7f704645c6f88878223e1b (patch)
treeca5bbc6e7ab3c60316ed602f9a637ff423203f96 /src/vnet/ipsec/esp_encrypt.c
parentb3eeb6a5dd17627f56f5a9f299950c96f952e7a1 (diff)
IPSec AH protocol enhancement in VPP native core
Change-Id: Iec5804d768485f4015bbf732d8d19ef2f24e6939 Signed-off-by: “mukeshyadav1984” <mukyadav@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/esp_encrypt.c')
-rw-r--r--src/vnet/ipsec/esp_encrypt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vnet/ipsec/esp_encrypt.c b/src/vnet/ipsec/esp_encrypt.c
index 7bf1256acca..3e196b34869 100644
--- a/src/vnet/ipsec/esp_encrypt.c
+++ b/src/vnet/ipsec/esp_encrypt.c
@@ -22,7 +22,7 @@
#include <vnet/ipsec/ipsec.h>
#include <vnet/ipsec/esp.h>
-esp_main_t esp_main;
+ipsec_proto_main_t ipsec_proto_main;
#define foreach_esp_encrypt_next \
_(DROP, "error-drop") \
@@ -88,7 +88,7 @@ always_inline void
esp_encrypt_aes_cbc (ipsec_crypto_alg_t alg,
u8 * in, u8 * out, size_t in_len, u8 * key, u8 * iv)
{
- esp_main_t *em = &esp_main;
+ ipsec_proto_main_t *em = &ipsec_proto_main;
u32 thread_index = vlib_get_thread_index ();
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
EVP_CIPHER_CTX *ctx = em->per_thread_data[thread_index].encrypt_ctx;
@@ -100,13 +100,14 @@ esp_encrypt_aes_cbc (ipsec_crypto_alg_t alg,
ASSERT (alg < IPSEC_CRYPTO_N_ALG);
- if (PREDICT_FALSE (em->esp_crypto_algs[alg].type == IPSEC_CRYPTO_ALG_NONE))
+ if (PREDICT_FALSE
+ (em->ipsec_proto_main_crypto_algs[alg].type == IPSEC_CRYPTO_ALG_NONE))
return;
if (PREDICT_FALSE
(alg != em->per_thread_data[thread_index].last_encrypt_alg))
{
- cipher = em->esp_crypto_algs[alg].type;
+ cipher = em->ipsec_proto_main_crypto_algs[alg].type;
em->per_thread_data[thread_index].last_encrypt_alg = alg;
}