diff options
author | Martin Willi <martin@strongswan.org> | 2007-06-14 08:13:05 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2007-06-14 08:13:05 +0000 |
commit | 26424f03c35bbfbcf264db950335c48c54c619fc (patch) | |
tree | ea08945ee744779da5319da72c1108690c518d67 /src/charon/sa/task_manager.c | |
parent | eda454a26137b6a2d3a85d0eb3d84f7c827d7c7d (diff) | |
download | strongswan-26424f03c35bbfbcf264db950335c48c54c619fc.tar.bz2 strongswan-26424f03c35bbfbcf264db950335c48c54c619fc.tar.xz |
proper reauthentication:
IKE_SA is closed completely before the new is initiated,
resolves some issues when a dynamic IP is requested from a pool
Diffstat (limited to 'src/charon/sa/task_manager.c')
-rw-r--r-- | src/charon/sa/task_manager.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/charon/sa/task_manager.c b/src/charon/sa/task_manager.c index 3f13dcef5..11c2592ba 100644 --- a/src/charon/sa/task_manager.c +++ b/src/charon/sa/task_manager.c @@ -302,6 +302,11 @@ static status_t build_request(private_task_manager_t *this) exchange = CREATE_CHILD_SA; break; } + if (activate_task(this, IKE_REAUTH)) + { + exchange = INFORMATIONAL; + break; + } if (activate_task(this, IKE_DEADPEER)) { exchange = INFORMATIONAL; @@ -456,7 +461,7 @@ static void handle_collisions(private_task_manager_t *this, task_t *task) /* do we have to check */ if (type == IKE_REKEY || type == CHILD_REKEY || - type == CHILD_DELETE || type == IKE_DELETE) + type == CHILD_DELETE || type == IKE_DELETE || type == IKE_REAUTH) { /* find an exchange collision, and notify these tasks */ iterator = this->active_tasks->create_iterator(this->active_tasks, TRUE); @@ -465,7 +470,8 @@ static void handle_collisions(private_task_manager_t *this, task_t *task) switch (active->get_type(active)) { case IKE_REKEY: - if (type == IKE_REKEY || type == IKE_DELETE) + if (type == IKE_REKEY || type == IKE_DELETE || + type == IKE_REAUTH) { ike_rekey_t *rekey = (ike_rekey_t*)active; rekey->collide(rekey, task); |