From 1dbf0ed9828471265f2b024c0b9ba3accaa9a9eb Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 7 Oct 2010 10:08:06 +0200 Subject: [PATCH] Do not add additional addresses to MOBIKE path probing messages. --- src/libcharon/sa/tasks/ike_mobike.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/libcharon/sa/tasks/ike_mobike.c b/src/libcharon/sa/tasks/ike_mobike.c index 1773f6b54..5b12eaaac 100644 --- a/src/libcharon/sa/tasks/ike_mobike.c +++ b/src/libcharon/sa/tasks/ike_mobike.c @@ -382,7 +382,7 @@ METHOD(task_t, build_i, status_t, build_cookie(this, message); update_children(this); } - if (this->address) + if (this->address && !this->check) { build_address_list(this, message); } @@ -543,20 +543,22 @@ METHOD(task_t, process_i, status_t, } if (this->update) { + /* use the same task to ... */ if (!this->ike_sa->has_condition(this->ike_sa, COND_ORIGINAL_INITIATOR)) - { + { /*... send an updated list of addresses as responder */ update_children(this); - return SUCCESS; + this->update = FALSE; + } + else + { /* ... send the update as original initiator */ + if (this->natd) + { + this->natd->task.destroy(&this->natd->task); + } + this->natd = ike_natd_create(this->ike_sa, this->initiator); } - /* original initiator starts the update with the same task */ this->check = FALSE; - this->address = FALSE; - if (this->natd) - { - this->natd->task.destroy(&this->natd->task); - } - this->natd = ike_natd_create(this->ike_sa, this->initiator); this->ike_sa->set_pending_updates(this->ike_sa, 1); return NEED_MORE; }