struct isakmp *isakmp = (struct isakmp *)msg->v;
isakmp_index *index = (isakmp_index *)isakmp;
- session = ike_session_get_session(local, remote, 1);
+ session = ike_session_get_session(local, remote, 0, index);
+ if (!session) {
+ session = ike_session_get_session(local, remote, 1, NULL);
+ }
if (!session) {
plog (ASL_LEVEL_INFO, "failed to allocate or find ike session.\n");
fatal_error(-1);
#endif
if (session == NULL) {
- session = ike_session_get_session(local, remote, 1);
+ session = ike_session_get_session(local, remote, 1, NULL);
if (!session) {
plog (ASL_LEVEL_INFO, "failed to allocate or find ike session.\n");
fatal_error(-1);