From: Martin Willi Date: Tue, 4 Nov 2014 12:54:29 +0000 (+0100) Subject: ikev2: Allow task to skip exchange by setting undefined exchange type X-Git-Tag: 5.3.0dr1~78^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52bd3b8ef9e1350b2a5abdf03245cc84cc227aa6;p=thirdparty%2Fstrongswan.git ikev2: Allow task to skip exchange by setting undefined exchange type --- diff --git a/src/libcharon/sa/ikev2/task_manager_v2.c b/src/libcharon/sa/ikev2/task_manager_v2.c index b558f429d4..613c72996c 100644 --- a/src/libcharon/sa/ikev2/task_manager_v2.c +++ b/src/libcharon/sa/ikev2/task_manager_v2.c @@ -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)) {