ike: Ignore rekeyed and deleted CHILD_SAs when reestablishing IKE_SAs
This commit is contained in:
parent
a1620c16ec
commit
a747ad738c
|
@ -1928,6 +1928,15 @@ static status_t reestablish_children(private_ike_sa_t *this, ike_sa_t *new,
|
|||
enumerator = create_child_sa_enumerator(this);
|
||||
while (enumerator->enumerate(enumerator, (void**)&child_sa))
|
||||
{
|
||||
switch (child_sa->get_state(child_sa))
|
||||
{
|
||||
case CHILD_REKEYED:
|
||||
case CHILD_DELETED:
|
||||
/* ignore CHILD_SAs in these states */
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (force)
|
||||
{
|
||||
action = ACTION_RESTART;
|
||||
|
@ -2008,6 +2017,15 @@ METHOD(ike_sa_t, reestablish, status_t,
|
|||
enumerator = array_create_enumerator(this->child_sas);
|
||||
while (enumerator->enumerate(enumerator, (void**)&child_sa))
|
||||
{
|
||||
switch (child_sa->get_state(child_sa))
|
||||
{
|
||||
case CHILD_REKEYED:
|
||||
case CHILD_DELETED:
|
||||
/* ignore CHILD_SAs in these states */
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (this->state == IKE_DELETING)
|
||||
{
|
||||
action = child_sa->get_close_action(child_sa);
|
||||
|
|
|
@ -1796,6 +1796,15 @@ static void trigger_mbb_reauth(private_task_manager_t *this)
|
|||
{
|
||||
child_create_t *child_create;
|
||||
|
||||
switch (child_sa->get_state(child_sa))
|
||||
{
|
||||
case CHILD_REKEYED:
|
||||
case CHILD_DELETED:
|
||||
/* ignore CHILD_SAs in these states */
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
cfg = child_sa->get_config(child_sa);
|
||||
child_create = child_create_create(new, cfg->get_ref(cfg),
|
||||
FALSE, NULL, NULL);
|
||||
|
|
Loading…
Reference in New Issue