Send list of additional addresses even if current path is still valid.
authorTobias Brunner <tobias@strongswan.org>
Tue, 5 Oct 2010 15:55:32 +0000 (17:55 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 12 Oct 2010 09:11:05 +0000 (11:11 +0200)
src/libcharon/sa/ike_sa.c

index c654e9e..6234ea2 100644 (file)
@@ -1809,8 +1809,19 @@ METHOD(ike_sa_t, roam, status_t,
                DBG2(DBG_IKE, "keeping connection path %H - %H",
                         this->my_host, this->other_host);
                set_condition(this, COND_STALE, FALSE);
+
+               if (supports_extension(this, EXT_MOBIKE) && address)
+               {       /* if any addresses changed, send an updated list */
+                       DBG1(DBG_IKE, "sending address list update using MOBIKE");
+                       mobike = ike_mobike_create(&this->public, TRUE);
+                       mobike->addresses(mobike);
+                       this->task_manager->queue_task(this->task_manager,
+                                                                                  (task_t*)mobike);
+                       return this->task_manager->initiate(this->task_manager);
+               }
                return SUCCESS;
        }
+
        if (!is_any_path_valid(this))
        {
                DBG1(DBG_IKE, "no route found to reach %H, MOBIKE update deferred",