Skip to content

Commit 2e49bbc

Browse files
Afschin Hormozdiarytobiasbrunner
authored andcommitted
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.
1 parent caa4f37 commit 2e49bbc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libcharon/sa/ikev1/task_manager_v1.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -544,20 +544,20 @@ METHOD(task_manager_t, initiate, status_t,
544544
new_mid = TRUE;
545545
break;
546546
}
547-
if (!mode_config_expected(this) &&
548-
activate_task(this, TASK_QUICK_MODE))
547+
if (activate_task(this, TASK_ISAKMP_DPD))
549548
{
550-
exchange = QUICK_MODE;
549+
exchange = INFORMATIONAL_V1;
551550
new_mid = TRUE;
552551
break;
553552
}
554-
if (activate_task(this, TASK_INFORMATIONAL))
553+
if (!mode_config_expected(this) &&
554+
activate_task(this, TASK_QUICK_MODE))
555555
{
556-
exchange = INFORMATIONAL_V1;
556+
exchange = QUICK_MODE;
557557
new_mid = TRUE;
558558
break;
559559
}
560-
if (activate_task(this, TASK_ISAKMP_DPD))
560+
if (activate_task(this, TASK_INFORMATIONAL))
561561
{
562562
exchange = INFORMATIONAL_V1;
563563
new_mid = TRUE;

0 commit comments

Comments
 (0)