controller: Immediately return after re-initiating an existing IKE_SA childless

If no CHILD_SA is initiated, we wait for a state change to IKE_ESTABLISHED
but that will never happen for already established IKE_SAs.

References strongswan/strongswan#1553
This commit is contained in:
Tobias Brunner
2023-03-21 16:25:51 +01:00
parent dd79253e2d
commit e6a354a996
+6 -2
View File
@@ -475,9 +475,13 @@ METHOD(job_t, initiate_execute, job_requeue_t,
if (ike_sa->initiate(ike_sa, listener->child_cfg, NULL) == SUCCESS) if (ike_sa->initiate(ike_sa, listener->child_cfg, NULL) == SUCCESS)
{ {
if (!listener->logger.callback) if (!listener->logger.callback ||
{ (!listener->child_cfg &&
ike_sa->get_state(ike_sa) != IKE_CONNECTING))
{ /* immediately return if we don't block or after re-initiating an
* existing IKE_SA childless */
listener->status = SUCCESS; listener->status = SUCCESS;
listener_done(listener);
} }
charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa); charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
} }