diff options
author | 2022-02-18 08:05:00 +0000 | |
---|---|---|
committer | 2022-06-09 17:05:38 +0000 | |
commit | 3159d1c2107698b2bdc17dc889088058540f9e10 (patch) | |
tree | 1dbe1a9b76b5ec1505ec03d007156f94d14a30e2 /src/vnet/ipsec/ipsec_spd_policy.c | |
parent | c015843c544a6dbdef652a1a6b016df30dbbfc87 (diff) |
ipsec: fix vector after remove entry in spd
Originally after remove the policy entry in spd, macro "vec_del1"
can change localization of the last entry in vector and finally the
entry list has not been sorted.
This patch fixes this issue by change executed macro "vec_delete"
instead of "vec_del1".
Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I396591cbbe17646e1d243aedb4cdc272ed4d5e25
(cherry picked from commit aacd3ed6d5c9c32b646795583a634ca5925603d2)
Diffstat (limited to 'src/vnet/ipsec/ipsec_spd_policy.c')
-rw-r--r-- | src/vnet/ipsec/ipsec_spd_policy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/ipsec/ipsec_spd_policy.c b/src/vnet/ipsec/ipsec_spd_policy.c index 85acf7aea7b..36405bd6d9b 100644 --- a/src/vnet/ipsec/ipsec_spd_policy.c +++ b/src/vnet/ipsec/ipsec_spd_policy.c @@ -217,7 +217,7 @@ ipsec_add_del_policy (vlib_main_t * vm, spd->policies[policy->type][ii]); if (ipsec_policy_is_equal (vp, policy)) { - vec_del1 (spd->policies[policy->type], ii); + vec_delete (spd->policies[policy->type], 1, ii); ipsec_sa_unlock (vp->sa_index); pool_put (im->policies, vp); break; |