diff options
author | Kingwel Xie <kingwel.xie@ericsson.com> | 2019-03-05 22:56:17 -0500 |
---|---|---|
committer | Kingwel Xie <kingwel.xie@ericsson.com> | 2019-03-05 22:56:17 -0500 |
commit | 561d1caad7ab9b5f75a88d3a71fa2150212eb317 (patch) | |
tree | 45e768fa17bec6c4bcac369af3db99a0f1a0f816 /src/vnet/ipsec/ah_decrypt.c | |
parent | 665581a5de364341c8c924d39dbb54a2bda3715c (diff) |
ipsec: cleanup, remove unnecessary code,
ipsec_proto_main moved to ipsec.c
fix missing '\0' of backend name
Change-Id: I90760b3045973a46792c2f098d9b0b1b3d209ad0
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
Diffstat (limited to 'src/vnet/ipsec/ah_decrypt.c')
-rw-r--r-- | src/vnet/ipsec/ah_decrypt.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vnet/ipsec/ah_decrypt.c b/src/vnet/ipsec/ah_decrypt.c index 28589127d25..0fc4f48571d 100644 --- a/src/vnet/ipsec/ah_decrypt.c +++ b/src/vnet/ipsec/ah_decrypt.c @@ -87,7 +87,7 @@ ah_decrypt_inline (vlib_main_t * vm, ipsec_proto_main_t *em = &ipsec_proto_main; from = vlib_frame_vector_args (from_frame); n_left_from = from_frame->n_vectors; - int icv_size = 0; + int icv_size; next_index = node->cached_next_index; thread_index = vm->thread_index; @@ -178,9 +178,7 @@ ah_decrypt_inline (vlib_main_t * vm, if (PREDICT_TRUE (sa0->integ_alg != IPSEC_INTEG_ALG_NONE)) { u8 sig[64]; - u8 digest[64]; - clib_memset (sig, 0, sizeof (sig)); - clib_memset (digest, 0, sizeof (digest)); + u8 digest[icv_size]; u8 *icv = ah0->auth_data; memcpy (digest, icv, icv_size); clib_memset (icv, 0, icv_size); |