merging kernel_klips plugin back into trunk
This commit is contained in:
@@ -327,20 +327,14 @@ static status_t select_and_install(private_child_create_t *this, bool no_dh)
|
||||
}
|
||||
}
|
||||
|
||||
this->child_sa->set_state(this->child_sa, CHILD_INSTALLING);
|
||||
|
||||
if (this->ipcomp != IPCOMP_NONE)
|
||||
{
|
||||
this->child_sa->activate_ipcomp(this->child_sa, this->ipcomp,
|
||||
this->other_cpi);
|
||||
}
|
||||
|
||||
status = this->child_sa->add_policies(this->child_sa, my_ts, other_ts,
|
||||
this->mode, this->proposal->get_protocol(this->proposal));
|
||||
if (status != SUCCESS)
|
||||
{
|
||||
DBG1(DBG_IKE, "unable to install IPsec policies (SPD) in kernel");
|
||||
return NOT_FOUND;
|
||||
}
|
||||
|
||||
status = FAILED;
|
||||
if (this->keymat->derive_child_keys(this->keymat, this->proposal,
|
||||
this->dh, nonce_i, nonce_r, &encr_i, &integ_i, &encr_r, &integ_r))
|
||||
@@ -367,6 +361,14 @@ static status_t select_and_install(private_child_create_t *this, bool no_dh)
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
status = this->child_sa->add_policies(this->child_sa, my_ts, other_ts,
|
||||
this->mode, this->proposal->get_protocol(this->proposal));
|
||||
if (status != SUCCESS)
|
||||
{
|
||||
DBG1(DBG_IKE, "unable to install IPsec policies (SPD) in kernel");
|
||||
return NOT_FOUND;
|
||||
}
|
||||
|
||||
charon->bus->child_keys(charon->bus, this->child_sa, this->dh,
|
||||
nonce_i, nonce_r);
|
||||
|
||||
|
||||
@@ -251,11 +251,16 @@ static void update_children(private_ike_mobike_t *this)
|
||||
iterator = this->ike_sa->create_child_sa_iterator(this->ike_sa);
|
||||
while (iterator->iterate(iterator, (void**)&child_sa))
|
||||
{
|
||||
child_sa->update_hosts(child_sa,
|
||||
this->ike_sa->get_my_host(this->ike_sa),
|
||||
this->ike_sa->get_other_host(this->ike_sa),
|
||||
this->ike_sa->get_virtual_ip(this->ike_sa, TRUE),
|
||||
this->ike_sa->has_condition(this->ike_sa, COND_NAT_ANY));
|
||||
if (child_sa->update_hosts(child_sa,
|
||||
this->ike_sa->get_my_host(this->ike_sa),
|
||||
this->ike_sa->get_other_host(this->ike_sa),
|
||||
this->ike_sa->get_virtual_ip(this->ike_sa, TRUE),
|
||||
this->ike_sa->has_condition(this->ike_sa, COND_NAT_ANY)) == NOT_SUPPORTED)
|
||||
{
|
||||
this->ike_sa->rekey_child_sa(this->ike_sa,
|
||||
child_sa->get_protocol(child_sa),
|
||||
child_sa->get_spi(child_sa, TRUE));
|
||||
}
|
||||
}
|
||||
iterator->destroy(iterator);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "task.h"
|
||||
|
||||
#ifdef ME
|
||||
ENUM(task_type_names, IKE_INIT, CHILD_REKEY,
|
||||
"IKE_INIT",
|
||||
"IKE_NATD",
|
||||
@@ -31,11 +32,27 @@ ENUM(task_type_names, IKE_INIT, CHILD_REKEY,
|
||||
"IKE_REAUTH",
|
||||
"IKE_DELETE",
|
||||
"IKE_DPD",
|
||||
#ifdef ME
|
||||
"IKE_ME",
|
||||
#endif /* ME */
|
||||
"CHILD_CREATE",
|
||||
"CHILD_DELETE",
|
||||
"CHILD_REKEY",
|
||||
);
|
||||
|
||||
#else
|
||||
ENUM(task_type_names, IKE_INIT, CHILD_REKEY,
|
||||
"IKE_INIT",
|
||||
"IKE_NATD",
|
||||
"IKE_MOBIKE",
|
||||
"IKE_AUTHENTICATE",
|
||||
"IKE_AUTH_LIFETIME",
|
||||
"IKE_CERT_PRE",
|
||||
"IKE_CERT_POST",
|
||||
"IKE_CONFIG",
|
||||
"IKE_REKEY",
|
||||
"IKE_REAUTH",
|
||||
"IKE_DELETE",
|
||||
"IKE_DPD",
|
||||
"CHILD_CREATE",
|
||||
"CHILD_DELETE",
|
||||
"CHILD_REKEY",
|
||||
);
|
||||
#endif /* ME */
|
||||
|
||||
Reference in New Issue
Block a user