]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
ikev2: Allow task to skip exchange by setting undefined exchange type
authorMartin Willi <martin@revosec.ch>
Tue, 4 Nov 2014 12:54:29 +0000 (13:54 +0100)
committerMartin Willi <martin@revosec.ch>
Fri, 20 Feb 2015 12:34:57 +0000 (13:34 +0100)
src/libcharon/sa/ikev2/task_manager_v2.c

index b558f429d41dd6a9395e1ba6e64edb5eec1539e0..613c72996c1524e2a94db471622c6365bcf50368 100644 (file)
@@ -609,6 +609,11 @@ METHOD(task_manager_t, initiate, status_t,
 
        /* update exchange type if a task changed it */
        this->initiating.type = message->get_exchange_type(message);
+       if (this->initiating.type == EXCHANGE_TYPE_UNDEFINED)
+       {
+               message->destroy(message);
+               return SUCCESS;
+       }
 
        if (!generate_message(this, message, &this->initiating.packets))
        {