diff options
author | Neale Ranns <nranns@cisco.com> | 2019-04-16 02:41:34 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-04-17 13:05:07 +0000 |
commit | 80f6fd53feaa10b4a798582100724075897c0944 (patch) | |
tree | 1cd1a7f4b910cf5fbf32aa4b4e2c1028c6c980b7 /src/vnet/ipsec/esp_decrypt.c | |
parent | d8cfbebce78e26a6ef7f6693e7c90dc3c6435d51 (diff) |
IPSEC: Pass the algorithm salt (used in GCM) over the API
Change-Id: Ia8cea13f7b937294e6a080a55fb2ceff30063acf
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/esp_decrypt.c')
-rw-r--r-- | src/vnet/ipsec/esp_decrypt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vnet/ipsec/esp_decrypt.c b/src/vnet/ipsec/esp_decrypt.c index d2365fce2d8..e74c1bb908a 100644 --- a/src/vnet/ipsec/esp_decrypt.c +++ b/src/vnet/ipsec/esp_decrypt.c @@ -239,7 +239,6 @@ esp_decrypt_inline (vlib_main_t * vm, esp_header_t *esp0; esp_aead_t *aad; u8 *scratch; - u32 salt; /* * construct the AAD and the nonce (Salt || IV) in a scratch @@ -258,9 +257,8 @@ esp_decrypt_inline (vlib_main_t * vm, * can overwrite it with the salt and use the IV where it is * to form the nonce = (Salt + IV) */ - salt = clib_host_to_net_u32 (sa0->salt); op->iv -= sizeof (sa0->salt); - clib_memcpy_fast (op->iv, &salt, sizeof (sa0->salt)); + clib_memcpy_fast (op->iv, &sa0->salt, sizeof (sa0->salt)); op->iv_len = cpd.iv_sz + sizeof (sa0->salt); op->tag = payload + len; |