]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
ikev1: Activate DELETE tasks before other tasks in state ESTABLISHED
authorTobias Brunner <tobias@strongswan.org>
Fri, 15 Apr 2016 10:04:32 +0000 (12:04 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 6 May 2016 13:35:16 +0000 (15:35 +0200)
Fixes #1410.

src/libcharon/sa/ikev1/task_manager_v1.c

index 7aa2c646b5cc37434e97816ef2102d6d8a312940..96005d7366996a38c9b0a89073fd1b67ddee7448 100644 (file)
@@ -514,26 +514,26 @@ METHOD(task_manager_t, initiate, status_t,
                                        new_mid = TRUE;
                                        break;
                                }
-                               if (!mode_config_expected(this) &&
-                                       activate_task(this, TASK_QUICK_MODE))
+                               if (activate_task(this, TASK_ISAKMP_DELETE))
                                {
-                                       exchange = QUICK_MODE;
+                                       exchange = INFORMATIONAL_V1;
                                        new_mid = TRUE;
                                        break;
                                }
-                               if (activate_task(this, TASK_INFORMATIONAL))
+                               if (activate_task(this, TASK_QUICK_DELETE))
                                {
                                        exchange = INFORMATIONAL_V1;
                                        new_mid = TRUE;
                                        break;
                                }
-                               if (activate_task(this, TASK_QUICK_DELETE))
+                               if (!mode_config_expected(this) &&
+                                       activate_task(this, TASK_QUICK_MODE))
                                {
-                                       exchange = INFORMATIONAL_V1;
+                                       exchange = QUICK_MODE;
                                        new_mid = TRUE;
                                        break;
                                }
-                               if (activate_task(this, TASK_ISAKMP_DELETE))
+                               if (activate_task(this, TASK_INFORMATIONAL))
                                {
                                        exchange = INFORMATIONAL_V1;
                                        new_mid = TRUE;