From 07a9d5c91a3bd88fbfe5a36a807655bebfef42ae Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 18 Jul 2013 10:12:20 +0200 Subject: [PATCH] ike: Fix reestablishing SAs if no child-creating tasks are queued --- src/libcharon/sa/ike_sa.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libcharon/sa/ike_sa.c b/src/libcharon/sa/ike_sa.c index 508612034c..2f4e1123c2 100644 --- a/src/libcharon/sa/ike_sa.c +++ b/src/libcharon/sa/ike_sa.c @@ -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)) -- 2.47.2