ike: Trigger CHILD_INSTALLED state change after corresponding log message
This way we get the log message in stroke and swanctl as last message when establishing a connection. It's already like this for the IKE_SA where IKE_ESTABLISHED is set after the corresponding log message. Fixes #2364.
This commit is contained in:
@@ -396,10 +396,6 @@ static bool install(private_quick_mode_t *this)
|
|||||||
charon->bus->child_keys(charon->bus, this->child_sa, this->initiator,
|
charon->bus->child_keys(charon->bus, this->child_sa, this->initiator,
|
||||||
this->dh, this->nonce_i, this->nonce_r);
|
this->dh, this->nonce_i, this->nonce_r);
|
||||||
|
|
||||||
/* add to IKE_SA, and remove from task */
|
|
||||||
this->child_sa->set_state(this->child_sa, CHILD_INSTALLED);
|
|
||||||
this->ike_sa->add_child_sa(this->ike_sa, this->child_sa);
|
|
||||||
|
|
||||||
my_ts = linked_list_create_from_enumerator(
|
my_ts = linked_list_create_from_enumerator(
|
||||||
this->child_sa->create_ts_enumerator(this->child_sa, TRUE));
|
this->child_sa->create_ts_enumerator(this->child_sa, TRUE));
|
||||||
other_ts = linked_list_create_from_enumerator(
|
other_ts = linked_list_create_from_enumerator(
|
||||||
@@ -415,6 +411,9 @@ static bool install(private_quick_mode_t *this)
|
|||||||
my_ts->destroy(my_ts);
|
my_ts->destroy(my_ts);
|
||||||
other_ts->destroy(other_ts);
|
other_ts->destroy(other_ts);
|
||||||
|
|
||||||
|
this->child_sa->set_state(this->child_sa, CHILD_INSTALLED);
|
||||||
|
this->ike_sa->add_child_sa(this->ike_sa, this->child_sa);
|
||||||
|
|
||||||
if (this->rekey)
|
if (this->rekey)
|
||||||
{
|
{
|
||||||
old = this->ike_sa->get_child_sa(this->ike_sa,
|
old = this->ike_sa->get_child_sa(this->ike_sa,
|
||||||
|
|||||||
@@ -745,12 +745,6 @@ static status_t select_and_install(private_child_create_t *this,
|
|||||||
charon->bus->child_keys(charon->bus, this->child_sa, this->initiator,
|
charon->bus->child_keys(charon->bus, this->child_sa, this->initiator,
|
||||||
this->dh, nonce_i, nonce_r);
|
this->dh, nonce_i, nonce_r);
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
schedule_inactivity_timeout(this);
|
|
||||||
|
|
||||||
my_ts = linked_list_create_from_enumerator(
|
my_ts = linked_list_create_from_enumerator(
|
||||||
this->child_sa->create_ts_enumerator(this->child_sa, TRUE));
|
this->child_sa->create_ts_enumerator(this->child_sa, TRUE));
|
||||||
other_ts = linked_list_create_from_enumerator(
|
other_ts = linked_list_create_from_enumerator(
|
||||||
@@ -767,6 +761,12 @@ static status_t select_and_install(private_child_create_t *this,
|
|||||||
|
|
||||||
my_ts->destroy(my_ts);
|
my_ts->destroy(my_ts);
|
||||||
other_ts->destroy(other_ts);
|
other_ts->destroy(other_ts);
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
schedule_inactivity_timeout(this);
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user