ikev1: Ensure DPD_ACK is sent in time

If a lot of QUICK_MODE tasks are queued and the other side
sends a DPD request, there is a good chance for timeouts.

Observed this in cases where other side is quite slow in responding
QUICK_MODE requests (e.g. Cisco ASA v8.x) and about 100 CHILD_SAs
are to be spawned.

Closes strongswan/strongswan#115.
This commit is contained in:
Afschin Hormozdiary
2018-11-20 10:24:48 +01:00
committed by Tobias Brunner
parent caa4f37110
commit 2e49bbcc49
+6 -6
View File
@@ -544,6 +544,12 @@ METHOD(task_manager_t, initiate, status_t,
new_mid = TRUE;
break;
}
if (activate_task(this, TASK_ISAKMP_DPD))
{
exchange = INFORMATIONAL_V1;
new_mid = TRUE;
break;
}
if (!mode_config_expected(this) &&
activate_task(this, TASK_QUICK_MODE))
{
@@ -557,12 +563,6 @@ METHOD(task_manager_t, initiate, status_t,
new_mid = TRUE;
break;
}
if (activate_task(this, TASK_ISAKMP_DPD))
{
exchange = INFORMATIONAL_V1;
new_mid = TRUE;
break;
}
break;
case IKE_REKEYING:
if (activate_task(this, TASK_ISAKMP_DELETE))