Adopt children as XAuth initiator (which is IKE responder)
authorMartin Willi <martin@revosec.ch>
Thu, 14 Jun 2012 12:46:48 +0000 (14:46 +0200)
committerMartin Willi <martin@revosec.ch>
Thu, 14 Jun 2012 12:49:19 +0000 (14:49 +0200)
src/libcharon/sa/ikev1/tasks/xauth.c

index 059877e..730ac35 100644 (file)
@@ -239,8 +239,6 @@ METHOD(task_t, build_r_ack, status_t,
 
        if (this->status == XAUTH_OK && establish(this))
        {
-               lib->processor->queue_job(lib->processor, (job_t*)
-                               adopt_children_job_create(this->ike_sa->get_id(this->ike_sa)));
                return SUCCESS;
        }
        return FAILED;
@@ -343,6 +341,8 @@ METHOD(task_t, process_i_status, status_t,
                return FAILED;
        }
        this->ike_sa->set_condition(this->ike_sa, COND_XAUTH_AUTHENTICATED, TRUE);
+       lib->processor->queue_job(lib->processor, (job_t*)
+                               adopt_children_job_create(this->ike_sa->get_id(this->ike_sa)));
        return SUCCESS;
 }