ikev1: Handle queued TRANSACTION messages only after processing replies
authorTobias Brunner <tobias@strongswan.org>
Mon, 28 Sep 2015 15:35:30 +0000 (17:35 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 30 Oct 2015 09:30:07 +0000 (10:30 +0100)
src/libcharon/sa/ikev1/task_manager_v1.c

index 0b329e0..a027b74 100644 (file)
@@ -1167,7 +1167,8 @@ static status_t process_response(private_task_manager_t *this,
        this->initiating.type = EXCHANGE_TYPE_UNDEFINED;
        clear_packets(this->initiating.packets);
 
-       if (this->queued && this->active_tasks->get_count(this->active_tasks) == 0)
+       if (this->queued && !this->active_tasks->get_count(this->active_tasks) &&
+               this->queued->get_exchange_type(this->queued) == TRANSACTION)
        {
                queued = this->queued;
                this->queued = NULL;