ike-sa: Add option to force the destruction of an IKE_SA after initiating a delete
This commit is contained in:
@@ -2021,7 +2021,7 @@ static status_t enforce_replace(private_ike_sa_manager_t *this,
|
||||
}
|
||||
DBG1(DBG_IKE, "deleting duplicate IKE_SA for peer '%Y' due to "
|
||||
"uniqueness policy", other);
|
||||
return duplicate->delete(duplicate);
|
||||
return duplicate->delete(duplicate, FALSE);
|
||||
}
|
||||
|
||||
METHOD(ike_sa_manager_t, check_uniqueness, bool,
|
||||
@@ -2266,20 +2266,7 @@ METHOD(ike_sa_manager_t, flush, void,
|
||||
while (enumerator->enumerate(enumerator, &entry, &segment))
|
||||
{
|
||||
charon->bus->set_sa(charon->bus, entry->ike_sa);
|
||||
if (entry->ike_sa->get_version(entry->ike_sa) == IKEV2)
|
||||
{ /* as the delete never gets processed, fire down events */
|
||||
switch (entry->ike_sa->get_state(entry->ike_sa))
|
||||
{
|
||||
case IKE_ESTABLISHED:
|
||||
case IKE_REKEYING:
|
||||
case IKE_DELETING:
|
||||
charon->bus->ike_updown(charon->bus, entry->ike_sa, FALSE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
entry->ike_sa->delete(entry->ike_sa);
|
||||
entry->ike_sa->delete(entry->ike_sa, TRUE);
|
||||
}
|
||||
enumerator->destroy(enumerator);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user