child-sa: Remove state to track installation of half the SA again

This commit is contained in:
Tobias Brunner
2017-05-23 18:46:49 +02:00
parent d94c122439
commit 0cbf75eb94
6 changed files with 47 additions and 62 deletions
-1
View File
@@ -31,7 +31,6 @@ ENUM(child_sa_state_names, CHILD_CREATED, CHILD_DESTROYING,
"CREATED",
"ROUTED",
"INSTALLING",
"INSTALLED_INBOUND",
"INSTALLED",
"UPDATING",
"REKEYING",
-5
View File
@@ -53,11 +53,6 @@ enum child_sa_state_t {
*/
CHILD_INSTALLING,
/**
* Installed the inbound SA of a CHILD_SA during rekeying
*/
CHILD_INSTALLED_INBOUND,
/**
* Installed both SAs of a CHILD_SA
*/
+1 -8
View File
@@ -745,14 +745,7 @@ static status_t select_and_install(private_child_create_t *this,
charon->bus->child_keys(charon->bus, this->child_sa, this->initiator,
this->dh, nonce_i, nonce_r);
if (this->rekey && !this->initiator)
{
this->child_sa->set_state(this->child_sa, CHILD_INSTALLED_INBOUND);
}
else
{
this->child_sa->set_state(this->child_sa, CHILD_INSTALLED);
}
this->child_sa->set_state(this->child_sa, CHILD_INSTALLED);
this->ike_sa->add_child_sa(this->ike_sa, this->child_sa);
this->established = TRUE;
@@ -271,7 +271,6 @@ static void process_payloads(private_child_delete_t *this, message_t *message)
break;
case CHILD_REKEYING:
/* we reply as usual, rekeying will fail */
case CHILD_INSTALLED_INBOUND:
case CHILD_INSTALLED:
if (!this->initiator)
{
+1 -2
View File
@@ -476,8 +476,7 @@ METHOD(child_rekey_t, collide, void,
/* ignore passive tasks that did not successfully create a CHILD_SA */
other_child = rekey->child_create->get_child(rekey->child_create);
if (!other_child ||
(other_child->get_state(other_child) != CHILD_INSTALLED &&
other_child->get_state(other_child) != CHILD_INSTALLED_INBOUND))
other_child->get_state(other_child) != CHILD_INSTALLED)
{
other->destroy(other);
return;