From: Tobias Brunner Date: Tue, 16 Sep 2014 12:59:05 +0000 (+0200) Subject: ikev2: Don't treat initial messages as MOBIKE exchanges X-Git-Tag: 5.2.1dr1~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=22949c590f390ac3f94e065313b99f71d80c70d3;p=thirdparty%2Fstrongswan.git ikev2: Don't treat initial messages as MOBIKE exchanges The MOBIKE task is active during the initial exchanges but we don't want to treat them as actual MOBIKE exchanges (i.e. there is no path probing). --- diff --git a/src/libcharon/sa/ikev2/task_manager_v2.c b/src/libcharon/sa/ikev2/task_manager_v2.c index 58f6bc61d3..0bc5a35fd7 100644 --- a/src/libcharon/sa/ikev2/task_manager_v2.c +++ b/src/libcharon/sa/ikev2/task_manager_v2.c @@ -235,16 +235,19 @@ METHOD(task_manager_t, retransmit, status_t, ike_mobike_t *mobike = NULL; /* check if we are retransmitting a MOBIKE routability check */ - enumerator = array_create_enumerator(this->active_tasks); - while (enumerator->enumerate(enumerator, (void*)&task)) + if (this->initiating.type == INFORMATIONAL) { - if (task->get_type(task) == TASK_IKE_MOBIKE) + enumerator = array_create_enumerator(this->active_tasks); + while (enumerator->enumerate(enumerator, (void*)&task)) { - mobike = (ike_mobike_t*)task; - break; + if (task->get_type(task) == TASK_IKE_MOBIKE) + { + mobike = (ike_mobike_t*)task; + break; + } } + enumerator->destroy(enumerator); } - enumerator->destroy(enumerator); if (!mobike || !mobike->is_probing(mobike)) {