ike-rekey: Make sure to ignore task when detecting collisions if ike-init subtask failed

For instance, if INVALID_KE_PAYLOAD is returned we don't want this task
to affect any active rekeying (no new SA has been established so far).
This commit is contained in:
Tobias Brunner 2016-06-01 15:45:01 +02:00
parent 2e33d1f9ae
commit 09711198a7
1 changed files with 2 additions and 1 deletions

View File

@ -242,9 +242,10 @@ METHOD(task_t, build_r, status_t,
message->add_notify(message, TRUE, NO_PROPOSAL_CHOSEN, chunk_empty);
return SUCCESS;
}
if (this->ike_init->task.build(&this->ike_init->task, message) == FAILED)
{
this->ike_init->task.destroy(&this->ike_init->task);
this->ike_init = NULL;
charon->bus->set_sa(charon->bus, this->ike_sa);
return SUCCESS;
}