mediation: Reschedule initiate mediation job if SA is not yet found

If the job gets queued for a newly created IKE_SA it might not yet be
checked in when the job is running, reschedule the job in that case.

This should fix the two p2pnat test scenarios, which occasionally
failed because one of the peers did not initiate the connection to
the mediation server.
This commit is contained in:
Tobias Brunner
2015-11-09 15:18:38 +01:00
parent bcad0f761f
commit 4ae2919518
@@ -161,6 +161,10 @@ METHOD(job_t, initiate, job_requeue_t,
}
mediated_cfg->destroy(mediated_cfg);
}
else
{ /* newly created IKE_SA is not checked in yet, try again */
return JOB_RESCHEDULE_MS(100);
}
return JOB_REQUEUE_NONE;
}