Fix IKEv1 DPD clear, destroying IKE_SA even if reestablish not needed
authorMartin Willi <martin@revosec.ch>
Mon, 21 May 2012 10:17:32 +0000 (12:17 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 21 May 2012 10:17:32 +0000 (12:17 +0200)
src/libcharon/processing/jobs/dpd_timeout_job.c

index c333799..4f427f1 100644 (file)
@@ -77,15 +77,9 @@ METHOD(job_t, execute, void,
                if (use_time < this->check)
                {
                        DBG1(DBG_JOB, "DPD check timed out, enforcing DPD action");
-                       if (ike_sa->reestablish(ike_sa) == SUCCESS)
-                       {
-                               charon->ike_sa_manager->checkin_and_destroy(
-                                                                                       charon->ike_sa_manager, ike_sa);
-                       }
-                       else
-                       {
-                               charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
-                       }
+                       ike_sa->reestablish(ike_sa);
+                       charon->ike_sa_manager->checkin_and_destroy(charon->ike_sa_manager,
+                                                                                                               ike_sa);
                }
                else
                {