From 63f6da4d0a6c0ffe090543323e49a8726920e860 Mon Sep 17 00:00:00 2001 From: Radu Nicolau Date: Fri, 9 Feb 2018 10:40:05 +0000 Subject: [PATCH] examples/ipsec-secgw: fix printed crypto name When AES-256 was used aes-128 was printed in the console Fixes: fa9088849e12 ("examples/ipsec-secgw: support AES 256") Signed-off-by: Radu Nicolau Acked-by: Anoob Joseph --- examples/ipsec-secgw/sa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index 21239dd978..d9dcc0e068 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -631,7 +631,8 @@ print_one_sa_rule(const struct ipsec_sa *sa, int inbound) printf("\tspi_%s(%3u):", inbound?"in":"out", sa->spi); for (i = 0; i < RTE_DIM(cipher_algos); i++) { - if (cipher_algos[i].algo == sa->cipher_algo) { + if (cipher_algos[i].algo == sa->cipher_algo && + cipher_algos[i].key_len == sa->cipher_key_len) { printf("%s ", cipher_algos[i].keyword); break; } -- 2.20.1