aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-07-28 12:25:01 +0200
committerTobias Brunner <tobias@strongswan.org>2014-09-12 10:29:36 +0200
commit1b17f647a5fa030b5efa4cf4c44173b9e2de61f1 (patch)
treee2cfd25879cdd95ec350a6a03bf90edeb8e7e04a /src
parent2180ace937f45fd9e4022b098ebc0a10934a494d (diff)
downloadstrongswan-1b17f647a5fa030b5efa4cf4c44173b9e2de61f1.tar.bz2
strongswan-1b17f647a5fa030b5efa4cf4c44173b9e2de61f1.tar.xz
ikev2: Enable path probing for currently active MOBIKE task
This might not be the case if e.g. an address appeared but the old one is still available but not actually usable. Without this the MOBIKE task would eventually time out even though we might be able to switch to a working address.
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/sa/ikev2/task_manager_v2.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libcharon/sa/ikev2/task_manager_v2.c b/src/libcharon/sa/ikev2/task_manager_v2.c
index 630c902f4..cd663dd81 100644
--- a/src/libcharon/sa/ikev2/task_manager_v2.c
+++ b/src/libcharon/sa/ikev2/task_manager_v2.c
@@ -1373,7 +1373,25 @@ METHOD(task_manager_t, queue_mobike, void,
mobike = ike_mobike_create(this->ike_sa, TRUE);
if (roam)
{
+ enumerator_t *enumerator;
+ task_t *current;
+
mobike->roam(mobike, address);
+
+ /* enable path probing for a currently active MOBIKE task. This might
+ * not be the case if an address appeared on a new interface while the
+ * current address is not working but has not yet disappeared. */
+ enumerator = array_create_enumerator(this->active_tasks);
+ while (enumerator->enumerate(enumerator, &current))
+ {
+ if (current->get_type(current) == TASK_IKE_MOBIKE)
+ {
+ ike_mobike_t *active = (ike_mobike_t*)current;
+ active->enable_probing(active);
+ break;
+ }
+ }
+ enumerator->destroy(enumerator);
}
else
{