diff options
author | Neale Ranns <nranns@cisco.com> | 2019-05-14 07:01:01 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-05-14 17:51:10 +0000 |
commit | 3fb65bea2be23cc6ea8a93e840afc93cf89f9ea5 (patch) | |
tree | d2f3a92f63479b64b417548382b9d258bbd3d04e | |
parent | a4ef82efee3d58ecda83f0982eff858252c51a90 (diff) |
IPSEC: remove unecessary pass by reference of sequence number
Change-Id: Id406eb8c69a89c57305d8f138e8e6730037aa799
Signed-off-by: Neale Ranns <nranns@cisco.com>
-rw-r--r-- | src/plugins/dpdk/ipsec/esp_decrypt.c | 2 | ||||
-rw-r--r-- | src/vnet/ipsec/ah_decrypt.c | 2 | ||||
-rw-r--r-- | src/vnet/ipsec/esp_decrypt.c | 2 | ||||
-rw-r--r-- | src/vnet/ipsec/ipsec_sa.h | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/dpdk/ipsec/esp_decrypt.c b/src/plugins/dpdk/ipsec/esp_decrypt.c index 47aff174e9e..10bfe98cf2c 100644 --- a/src/plugins/dpdk/ipsec/esp_decrypt.c +++ b/src/plugins/dpdk/ipsec/esp_decrypt.c @@ -548,7 +548,7 @@ dpdk_esp_decrypt_post_inline (vlib_main_t * vm, iv_size = cipher_alg->iv_len; - ipsec_sa_anti_replay_advance (sa0, &esp0->seq); + ipsec_sa_anti_replay_advance (sa0, esp0->seq); /* if UDP encapsulation is used adjust the address of the IP header */ if (ipsec_sa_is_set_UDP_ENCAP (sa0) diff --git a/src/vnet/ipsec/ah_decrypt.c b/src/vnet/ipsec/ah_decrypt.c index 0cced35b5cd..734700dda47 100644 --- a/src/vnet/ipsec/ah_decrypt.c +++ b/src/vnet/ipsec/ah_decrypt.c @@ -200,7 +200,7 @@ ah_decrypt_inline (vlib_main_t * vm, goto trace; } - ipsec_sa_anti_replay_advance (sa0, &ah0->seq_no); + ipsec_sa_anti_replay_advance (sa0, ah0->seq_no); } vlib_buffer_advance (i_b0, diff --git a/src/vnet/ipsec/esp_decrypt.c b/src/vnet/ipsec/esp_decrypt.c index 92bd606d771..a66eae7aadd 100644 --- a/src/vnet/ipsec/esp_decrypt.c +++ b/src/vnet/ipsec/esp_decrypt.c @@ -369,7 +369,7 @@ esp_decrypt_inline (vlib_main_t * vm, sa0 = vec_elt_at_index (im->sad, pd->sa_index); u8 *payload = b[0]->data + pd->current_data; - ipsec_sa_anti_replay_advance (sa0, &((esp_header_t *) payload)->seq); + ipsec_sa_anti_replay_advance (sa0, ((esp_header_t *) payload)->seq); esp_footer_t *f = (esp_footer_t *) (b[0]->data + pd->current_data + pd->current_length - sizeof (*f) - diff --git a/src/vnet/ipsec/ipsec_sa.h b/src/vnet/ipsec/ipsec_sa.h index 661b54a6ce9..e09b5391df3 100644 --- a/src/vnet/ipsec/ipsec_sa.h +++ b/src/vnet/ipsec/ipsec_sa.h @@ -297,13 +297,13 @@ ipsec_sa_anti_replay_check (ipsec_sa_t * sa, u32 * seqp) } always_inline void -ipsec_sa_anti_replay_advance (ipsec_sa_t * sa, u32 * seqp) +ipsec_sa_anti_replay_advance (ipsec_sa_t * sa, u32 seqp) { u32 pos, seq; if (PREDICT_TRUE (sa->flags & IPSEC_SA_FLAG_USE_ANTI_REPLAY) == 0) return; - seq = clib_host_to_net_u32 (*seqp); + seq = clib_host_to_net_u32 (seqp); if (PREDICT_TRUE (sa->flags & IPSEC_SA_FLAG_USE_ESN)) { int wrap = sa->seq_hi - sa->last_seq_hi; |