Don't invoke updown hook when flushing SAs for IKEv1, tasks will do it
This commit is contained in:
@@ -1695,16 +1695,18 @@ METHOD(ike_sa_manager_t, flush, void,
|
||||
while (enumerator->enumerate(enumerator, &entry, &segment))
|
||||
{
|
||||
charon->bus->set_sa(charon->bus, entry->ike_sa);
|
||||
/* 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;
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user