summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-03-31 17:54:49 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-20 09:54:39 +0000
commitc8b09a2d40bd008bfcc22aa9fd8adbf39a64dcce (patch)
treec1a2c58aa12a1d7c2c415fd53e98fe5a7211be34 /src
parentf77f8e29097c8c407d9572c36185d72378777f1b (diff)
ikev2: fix wrong index computation
Type: fix Change-Id: Ia7b07b4ec9e5681946f3f5c01c230c1f814e2cf6 Signed-off-by: Filip Tehlar <ftehlar@cisco.com> (cherry picked from commit c17d6cfaf4fc66927f28af9d8d7cb8ce2a1d839c)
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 16c21cb2418..16bd3f14973 100644
--- a/src/plugins/ikev2/ikev2.c
+++ b/src/plugins/ikev2/ikev2.c
@@ -3000,7 +3000,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;
ikev2_generate_sa_init_data (&sa);