Handle initiation of not supported IKE versions properly

This commit is contained in:
Martin Willi
2012-03-20 17:31:30 +01:00
parent daee47ba46
commit 3d54ae94d9
9 changed files with 111 additions and 47 deletions
+6 -4
View File
@@ -54,7 +54,6 @@ METHOD(task_t, process_i, status_t,
ike_sa_t *new;
host_t *host;
enumerator_t *enumerator;
ike_version_t version;
child_sa_t *child_sa;
peer_cfg_t *peer_cfg;
@@ -75,9 +74,12 @@ METHOD(task_t, process_i, status_t,
return FAILED;
}
version = this->ike_sa->get_version(this->ike_sa);
new = charon->ike_sa_manager->checkout_new(charon->ike_sa_manager, version,
TRUE);
new = charon->ike_sa_manager->checkout_new(charon->ike_sa_manager,
this->ike_sa->get_version(this->ike_sa), TRUE);
if (!new)
{ /* shouldn't happen */
return FAILED;
}
new->set_peer_cfg(new, peer_cfg);
host = this->ike_sa->get_other_host(this->ike_sa);