ike: Fix reestablishing SAs if no child-creating tasks are queued
authorTobias Brunner <tobias@strongswan.org>
Thu, 18 Jul 2013 08:12:20 +0000 (10:12 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 18 Jul 2013 08:40:08 +0000 (10:40 +0200)
src/libcharon/sa/ike_sa.c

index 5086120..2f4e112 100644 (file)
@@ -1617,8 +1617,11 @@ METHOD(ike_sa_t, reestablish, status_t,
                }
                enumerator->destroy(enumerator);
                /* check if we have tasks that recreate children */
-               restart = is_child_queued(this, TASK_QUEUE_ACTIVE) ||
-                                 is_child_queued(this, TASK_QUEUE_QUEUED);
+               if (!restart)
+               {
+                       restart = is_child_queued(this, TASK_QUEUE_ACTIVE) ||
+                                         is_child_queued(this, TASK_QUEUE_QUEUED);
+               }
 #ifdef ME
                /* mediation connections have no children, keep them up anyway */
                if (this->peer_cfg->is_mediation(this->peer_cfg))