ikev2: fix wrong index computation

Type: fix

Change-Id: Ia7b07b4ec9e5681946f3f5c01c230c1f814e2cf6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
This commit is contained in:
Filip Tehlar
2020-03-31 17:54:49 +00:00
committed by Neale Ranns
parent 1766ddca44
commit c17d6cfaf4

View File

@ -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;