aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian E. Hopps <chopps@chopps.org>2019-09-27 15:19:19 -0400
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-10-03 10:07:17 +0000
commit432fe38b61831a24f34fc6c16d188dfbfe13b90f (patch)
treea5c0a0a6af7b00ab4928a8d1d8acf23a2506d8c3 /src
parent41e96bbc6448afcfab5842a281315bae74a463ad (diff)
ipsec: allow null cipher with dpdk esp
The NULL cipher is a (valid) non-AEAD choice for ESP encrypt path. Allow it. Type: fix Signed-off-by: Christian E. Hopps <chopps@chopps.org> Change-Id: I6d8b66223a0ffb0952c2dd6fa898a8a2289fef7a (cherry picked from commit 5a2426386d31c90e833c639332a80a8b60bfed2f)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dpdk/ipsec/esp_encrypt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/dpdk/ipsec/esp_encrypt.c b/src/plugins/dpdk/ipsec/esp_encrypt.c
index 4d57909fbed..1d29841c5d7 100644
--- a/src/plugins/dpdk/ipsec/esp_encrypt.c
+++ b/src/plugins/dpdk/ipsec/esp_encrypt.c
@@ -511,7 +511,8 @@ dpdk_esp_encrypt_inline (vlib_main_t * vm,
u64 digest_paddr =
mb0->buf_physaddr + digest - ((u8 *) mb0->buf_addr);
- if (!is_aead && cipher_alg->alg == RTE_CRYPTO_CIPHER_AES_CBC)
+ if (!is_aead && (cipher_alg->alg == RTE_CRYPTO_CIPHER_AES_CBC ||
+ cipher_alg->alg == RTE_CRYPTO_CIPHER_NULL))
{
cipher_off = sizeof (esp_header_t);
cipher_len = iv_size + pad_payload_len;