summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ah_decrypt.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-03-20 16:07:09 +0100
committerNeale Ranns <nranns@cisco.com>2019-03-20 17:23:04 +0000
commitb966e8bfdd3c63e2436ab6e5d250c8b1bf4dd102 (patch)
tree7f3faba13dd462adc577bdc9798da99c209bee9c /src/vnet/ipsec/ah_decrypt.c
parentc372dc2190f2376f9b816f71120354fd53732fa7 (diff)
ipsec: keep crypto data inside SA
Change-Id: Ie8986bd3652d25c4befe681cea77df95aba37ebc Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/ah_decrypt.c')
-rw-r--r--src/vnet/ipsec/ah_decrypt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vnet/ipsec/ah_decrypt.c b/src/vnet/ipsec/ah_decrypt.c
index 2488fa918f6..b128dfaf26b 100644
--- a/src/vnet/ipsec/ah_decrypt.c
+++ b/src/vnet/ipsec/ah_decrypt.c
@@ -172,7 +172,7 @@ ah_decrypt_inline (vlib_main_t * vm,
(&ipsec_sa_counters, thread_index, sa_index0,
1, i_b0->current_length);
- icv_size = im->integ_algs[sa0->integ_alg].trunc_size;
+ icv_size = sa0->integ_trunc_size;
if (PREDICT_TRUE (sa0->integ_alg != IPSEC_INTEG_ALG_NONE))
{
u8 sig[64];
@@ -203,9 +203,7 @@ ah_decrypt_inline (vlib_main_t * vm,
icv_padding_len =
ah_calc_icv_padding_len (icv_size, 0 /* is_ipv6 */ );
}
- hmac_calc (vm, sa0->integ_alg, sa0->integ_key.data,
- sa0->integ_key.len, (u8 *) ih4, i_b0->current_length,
- sig, sa0->use_esn, sa0->seq_hi);
+ hmac_calc (vm, sa0, (u8 *) ih4, i_b0->current_length, sig);
if (PREDICT_FALSE (memcmp (digest, sig, icv_size)))
{