Invert check to delete unestablished IKE_SAs to not delete them once established

This commit is contained in:
Martin Willi 2011-02-09 15:03:08 +01:00
parent 320e98c2ac
commit 8ce567e69e
1 changed files with 2 additions and 2 deletions

View File

@ -76,8 +76,8 @@ METHOD(job_t, execute, void,
}
else
{
/* destroy only if not ESTABLISHED */
if (ike_sa->get_state(ike_sa) == IKE_ESTABLISHED)
/* destroy IKE_SA did not complete connecting phase */
if (ike_sa->get_state(ike_sa) != IKE_CONNECTING)
{
charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
}