aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-03-31 17:54:49 +0000
committerNeale Ranns <nranns@cisco.com>2020-04-06 09:09:14 +0000
commitc17d6cfaf4fc66927f28af9d8d7cb8ce2a1d839c (patch)
tree58260ee0814f103d7180cead0e4b454285c15afb /src
parent1766ddca4406cbfddb2878990d580a6f9e34a58e (diff)
ikev2: fix wrong index computation
Type: fix Change-Id: Ia7b07b4ec9e5681946f3f5c01c230c1f814e2cf6 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/ikev2/ikev2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c
index fc4a87d80fd..892f57cd1d6 100644
--- a/src/plugins/ikev2/ikev2.c
+++ b/src/plugins/ikev2/ikev2.c
@@ -3374,7 +3374,7 @@ ikev2_initiate_sa_init (vlib_main_t * vm, u8 * name)
ikev2_sa_free_proposal_vector (&proposals);
sa.is_initiator = 1;
- sa.profile_index = km->profiles - p;
+ sa.profile_index = p - km->profiles;
sa.is_profile_index_set = 1;
sa.state = IKEV2_STATE_SA_INIT;
sa.tun_itf = p->tun_itf;