diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/sa/ikev1/tasks/xauth.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libcharon/sa/ikev1/tasks/xauth.c b/src/libcharon/sa/ikev1/tasks/xauth.c index b4d690094..f55299398 100644 --- a/src/libcharon/sa/ikev1/tasks/xauth.c +++ b/src/libcharon/sa/ikev1/tasks/xauth.c @@ -354,7 +354,25 @@ METHOD(task_t, get_type, task_type_t, METHOD(task_t, migrate, void, private_xauth_t *this, ike_sa_t *ike_sa) { + DESTROY_IF(this->xauth); + DESTROY_IF(this->cp); + this->ike_sa = ike_sa; + this->xauth = NULL; + this->cp = NULL; + this->user = NULL; + this->status = XAUTH_FAILED; + + if (this->initiator) + { + this->public.task.build = _build_i; + this->public.task.process = _process_i; + } + else + { + this->public.task.build = _build_r; + this->public.task.process = _process_r; + } } METHOD(task_t, destroy, void, |