ikev1: Handle queued INFORMATIONAL message after receiving the last AM request
authorTobias Brunner <tobias@strongswan.org>
Mon, 28 Sep 2015 15:39:54 +0000 (17:39 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 30 Oct 2015 09:30:30 +0000 (10:30 +0100)
src/libcharon/sa/ikev1/task_manager_v1.c

index 5b0438f..a839f51 100644 (file)
@@ -1095,6 +1095,22 @@ static status_t process_request(private_task_manager_t *this,
                 * the same message again. */
                clear_packets(this->responding.packets);
        }
+       if (this->queued &&
+               this->queued->get_exchange_type(this->queued) == INFORMATIONAL_V1)
+       {
+               message_t *queued;
+               status_t status;
+
+               queued = this->queued;
+               this->queued = NULL;
+               status = this->public.task_manager.process_message(
+                                                                                       &this->public.task_manager, queued);
+               queued->destroy(queued);
+               if (status == DESTROY_ME)
+               {
+                       return status;
+               }
+       }
        if (this->passive_tasks->get_count(this->passive_tasks) == 0 &&
                this->queued_tasks->get_count(this->queued_tasks) > 0)
        {