ikev2: Reorder task activation for established IKE SAs
authorTobias Brunner <tobias@strongswan.org>
Fri, 19 Sep 2014 11:44:16 +0000 (13:44 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 25 Sep 2014 08:16:45 +0000 (10:16 +0200)
We now prefer MOBIKE tasks over delete tasks then the rest.

src/libcharon/sa/ikev2/task_manager_v2.c

index 834da8a..89bde41 100644 (file)
@@ -382,39 +382,39 @@ METHOD(task_manager_t, initiate, status_t,
                                }
                                break;
                        case IKE_ESTABLISHED:
-                               if (activate_task(this, TASK_CHILD_CREATE))
+                               if (activate_task(this, TASK_IKE_MOBIKE))
                                {
-                                       exchange = CREATE_CHILD_SA;
+                                       exchange = INFORMATIONAL;
                                        break;
                                }
-                               if (activate_task(this, TASK_CHILD_DELETE))
+                               if (activate_task(this, TASK_IKE_DELETE))
                                {
                                        exchange = INFORMATIONAL;
                                        break;
                                }
-                               if (activate_task(this, TASK_CHILD_REKEY))
+                               if (activate_task(this, TASK_CHILD_DELETE))
                                {
-                                       exchange = CREATE_CHILD_SA;
+                                       exchange = INFORMATIONAL;
                                        break;
                                }
-                               if (activate_task(this, TASK_IKE_DELETE))
+                               if (activate_task(this, TASK_IKE_REAUTH))
                                {
                                        exchange = INFORMATIONAL;
                                        break;
                                }
-                               if (activate_task(this, TASK_IKE_REKEY))
+                               if (activate_task(this, TASK_CHILD_CREATE))
                                {
                                        exchange = CREATE_CHILD_SA;
                                        break;
                                }
-                               if (activate_task(this, TASK_IKE_REAUTH))
+                               if (activate_task(this, TASK_CHILD_REKEY))
                                {
-                                       exchange = INFORMATIONAL;
+                                       exchange = CREATE_CHILD_SA;
                                        break;
                                }
-                               if (activate_task(this, TASK_IKE_MOBIKE))
+                               if (activate_task(this, TASK_IKE_REKEY))
                                {
-                                       exchange = INFORMATIONAL;
+                                       exchange = CREATE_CHILD_SA;
                                        break;
                                }
                                if (activate_task(this, TASK_IKE_DPD))