diff options
author | Neale Ranns <nranns@cisco.com> | 2019-07-12 09:15:26 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-07-12 12:24:55 +0000 |
commit | 495d7ffbc82823edccabab960fc81a909f80075d (patch) | |
tree | d4244f743b7406bbdc4235e6accdfc4899a88b83 /src/plugins | |
parent | def35a2352c9a54f748d301ffa47a446d25a83e0 (diff) |
ipsec: Reference count the SAs
- this remove the need to iterate through all state when deleting an SA
- and ensures that if the SA is deleted by the client is remains for use
in any state until that state is also removed.
Type: feature
Change-Id: I438cb67588cb65c701e49a7a9518f88641925419
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/unittest/ipsec_test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/unittest/ipsec_test.c b/src/plugins/unittest/ipsec_test.c index ec39a2e9042..c40e954786d 100644 --- a/src/plugins/unittest/ipsec_test.c +++ b/src/plugins/unittest/ipsec_test.c @@ -42,11 +42,13 @@ test_ipsec_command_fn (vlib_main_t * vm, ipsec_sa_t *sa; u32 sa_index; - sa_index = ipsec_get_sa_index_by_sa_id (sa_id); + sa_index = ipsec_sa_find_and_lock (sa_id); sa = pool_elt_at_index (im->sad, sa_index); sa->seq = seq_num & 0xffffffff; sa->seq_hi = seq_num >> 32; + + ipsec_sa_unlock (sa_index); } else { |