child-sa: Add a new state to track rekeyed IKEv1 CHILD_SAs
This is needed to handle DELETEs properly, which was previously done via
CHILD_REKEYING, which we don't use anymore since 5c6a62ceb6 as it prevents
reauthentication.
This commit is contained in:
@@ -105,7 +105,7 @@ static bool delete_child(private_quick_delete_t *this, protocol_id_t protocol,
|
||||
this->spi = spi = child_sa->get_spi(child_sa, TRUE);
|
||||
}
|
||||
|
||||
rekeyed = child_sa->get_state(child_sa) == CHILD_REKEYING;
|
||||
rekeyed = child_sa->get_state(child_sa) == CHILD_REKEYED;
|
||||
child_sa->set_state(child_sa, CHILD_DELETING);
|
||||
|
||||
my_ts = linked_list_create_from_enumerator(
|
||||
|
||||
@@ -402,7 +402,7 @@ static bool install(private_quick_mode_t *this)
|
||||
{
|
||||
charon->bus->child_rekey(charon->bus, old, this->child_sa);
|
||||
/* rekeyed CHILD_SAs stay installed until they expire */
|
||||
old->set_state(old, CHILD_INSTALLED);
|
||||
old->set_state(old, CHILD_REKEYED);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -988,6 +988,7 @@ static void check_for_rekeyed_child(private_quick_mode_t *this)
|
||||
{
|
||||
case CHILD_INSTALLED:
|
||||
case CHILD_REKEYING:
|
||||
case CHILD_REKEYED:
|
||||
policies = child_sa->create_policy_enumerator(child_sa);
|
||||
if (policies->enumerate(policies, &local, &remote) &&
|
||||
local->equals(local, this->tsr) &&
|
||||
|
||||
Reference in New Issue
Block a user