aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-06-28 12:22:10 +0200
committerTobias Brunner <tobias@strongswan.org>2016-07-19 11:48:17 +0200
commit60d0f52fd6da3cb9ac379487344c4936e5f73882 (patch)
treec3021fb93a949e539dd5f6f2e8600733cbaa311a /src
parent74de8c3727833891e6f3a73d5cc776d201112dfd (diff)
downloadstrongswan-60d0f52fd6da3cb9ac379487344c4936e5f73882.tar.bz2
strongswan-60d0f52fd6da3cb9ac379487344c4936e5f73882.tar.xz
ike1: Flush active queue when queueing a delete of the IKE_SA
By aborting the active task we don't have to wait for potential retransmits if the other peer does not respond to the current task. Since IKEv1 has no sequential message IDs and INFORMATIONALs are no real exchanges this should not be a problem. Fixes #1537 References #429, #1410 Closes strongswan/strongswan#48
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/sa/ikev1/task_manager_v1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcharon/sa/ikev1/task_manager_v1.c b/src/libcharon/sa/ikev1/task_manager_v1.c
index b0c4f5f84..117102bce 100644
--- a/src/libcharon/sa/ikev1/task_manager_v1.c
+++ b/src/libcharon/sa/ikev1/task_manager_v1.c
@@ -1661,6 +1661,9 @@ METHOD(task_manager_t, queue_ike_delete, void,
enumerator_t *enumerator;
child_sa_t *child_sa;
+ /* cancel any currently active task to get the DELETE done quickly */
+ flush_queue(this, TASK_QUEUE_ACTIVE);
+
enumerator = this->ike_sa->create_child_sa_enumerator(this->ike_sa);
while (enumerator->enumerate(enumerator, &child_sa))
{