Process ike_vendor task before ike_init, fixes support for private algs in IKE

This commit is contained in:
Martin Willi
2010-02-26 11:44:34 +01:00
parent ed5fc4cafe
commit 347488bd67
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -1191,10 +1191,10 @@ static status_t initiate(private_ike_sa_t *this,
set_condition(this, COND_ORIGINAL_INITIATOR, TRUE); set_condition(this, COND_ORIGINAL_INITIATOR, TRUE);
task = (task_t*)ike_init_create(&this->public, TRUE, NULL);
this->task_manager->queue_task(this->task_manager, task);
task = (task_t*)ike_vendor_create(&this->public, TRUE); task = (task_t*)ike_vendor_create(&this->public, TRUE);
this->task_manager->queue_task(this->task_manager, task); this->task_manager->queue_task(this->task_manager, task);
task = (task_t*)ike_init_create(&this->public, TRUE, NULL);
this->task_manager->queue_task(this->task_manager, task);
task = (task_t*)ike_natd_create(&this->public, TRUE); task = (task_t*)ike_natd_create(&this->public, TRUE);
this->task_manager->queue_task(this->task_manager, task); this->task_manager->queue_task(this->task_manager, task);
task = (task_t*)ike_cert_pre_create(&this->public, TRUE); task = (task_t*)ike_cert_pre_create(&this->public, TRUE);
+3 -3
View File
@@ -307,11 +307,11 @@ static status_t build_request(private_task_manager_t *this)
switch (this->ike_sa->get_state(this->ike_sa)) switch (this->ike_sa->get_state(this->ike_sa))
{ {
case IKE_CREATED: case IKE_CREATED:
activate_task(this, IKE_VENDOR);
if (activate_task(this, IKE_INIT)) if (activate_task(this, IKE_INIT))
{ {
this->initiating.mid = 0; this->initiating.mid = 0;
exchange = IKE_SA_INIT; exchange = IKE_SA_INIT;
activate_task(this, IKE_VENDOR);
activate_task(this, IKE_NATD); activate_task(this, IKE_NATD);
activate_task(this, IKE_CERT_PRE); activate_task(this, IKE_CERT_PRE);
#ifdef ME #ifdef ME
@@ -696,10 +696,10 @@ static status_t process_request(private_task_manager_t *this,
{ {
case IKE_SA_INIT: case IKE_SA_INIT:
{ {
task = (task_t*)ike_init_create(this->ike_sa, FALSE, NULL);
this->passive_tasks->insert_last(this->passive_tasks, task);
task = (task_t*)ike_vendor_create(this->ike_sa, FALSE); task = (task_t*)ike_vendor_create(this->ike_sa, FALSE);
this->passive_tasks->insert_last(this->passive_tasks, task); this->passive_tasks->insert_last(this->passive_tasks, task);
task = (task_t*)ike_init_create(this->ike_sa, FALSE, NULL);
this->passive_tasks->insert_last(this->passive_tasks, task);
task = (task_t*)ike_natd_create(this->ike_sa, FALSE); task = (task_t*)ike_natd_create(this->ike_sa, FALSE);
this->passive_tasks->insert_last(this->passive_tasks, task); this->passive_tasks->insert_last(this->passive_tasks, task);
task = (task_t*)ike_cert_pre_create(this->ike_sa, FALSE); task = (task_t*)ike_cert_pre_create(this->ike_sa, FALSE);