ike: Ignore rekeyed and deleted CHILD_SAs when reestablishing IKE_SAs
This commit is contained in:
@@ -1928,6 +1928,15 @@ static status_t reestablish_children(private_ike_sa_t *this, ike_sa_t *new,
|
|||||||
enumerator = create_child_sa_enumerator(this);
|
enumerator = create_child_sa_enumerator(this);
|
||||||
while (enumerator->enumerate(enumerator, (void**)&child_sa))
|
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)
|
if (force)
|
||||||
{
|
{
|
||||||
action = ACTION_RESTART;
|
action = ACTION_RESTART;
|
||||||
@@ -2008,6 +2017,15 @@ METHOD(ike_sa_t, reestablish, status_t,
|
|||||||
enumerator = array_create_enumerator(this->child_sas);
|
enumerator = array_create_enumerator(this->child_sas);
|
||||||
while (enumerator->enumerate(enumerator, (void**)&child_sa))
|
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)
|
if (this->state == IKE_DELETING)
|
||||||
{
|
{
|
||||||
action = child_sa->get_close_action(child_sa);
|
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;
|
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);
|
cfg = child_sa->get_config(child_sa);
|
||||||
child_create = child_create_create(new, cfg->get_ref(cfg),
|
child_create = child_create_create(new, cfg->get_ref(cfg),
|
||||||
FALSE, NULL, NULL);
|
FALSE, NULL, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user