diff options
author | Maxime Peim <mpeim@cisco.com> | 2023-10-31 16:29:59 +0100 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2023-11-09 14:24:25 +0000 |
commit | 115e31b43fcd5308601c624afbaf61211e48f56d (patch) | |
tree | 6ed604543afbd0dbbb29cf1b568abb1e50c54174 /src | |
parent | 0fbf07ed7fc94e5d83fe615aa92751fe349ea9d0 (diff) |
ipsec: IPsec fix constant propagation
In some anti-replay, some functions weren't using the boolean
telling if the window was huge or not. Hence, limiting the constant
propagation at compilation.
Type: fix
Change-Id: Ie5f2dda38339bb32113c6f7b2b82c82135fc92a8
Signed-off-by: Maxime Peim <mpeim@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/ipsec/ipsec_sa.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vnet/ipsec/ipsec_sa.h b/src/vnet/ipsec/ipsec_sa.h index 47058511036..4f73f1eab0f 100644 --- a/src/vnet/ipsec/ipsec_sa.h +++ b/src/vnet/ipsec/ipsec_sa.h @@ -731,13 +731,14 @@ ipsec_sa_anti_replay_window_shift (ipsec_sa_t *sa, u32 inc, bool ar_huge) else { /* holes in the replay window are lost packets */ - n_lost = window_size - IPSEC_SA_ANTI_REPLAY_WINDOW_N_SEEN (sa); + n_lost = window_size - + IPSEC_SA_ANTI_REPLAY_WINDOW_N_SEEN_KNOWN_WIN (sa, ar_huge); /* any sequence numbers that now fall outside the window * are forever lost */ n_lost += inc - window_size; - if (PREDICT_FALSE (ipsec_sa_is_set_ANTI_REPLAY_HUGE (sa))) + if (PREDICT_FALSE (ar_huge)) { clib_bitmap_zero (sa->replay_window_huge); clib_bitmap_set_no_check (sa->replay_window_huge, |