aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2015-03-10 13:59:49 +0100
committerMartin Willi <martin@revosec.ch>2015-03-10 14:02:22 +0100
commiteb3e339a3c58b6b1a35907c1d9023beaf7f25aaa (patch)
treed9305698809a99de8295c872e3730d63b83a28e6 /src
parent2b0f34a2ef8e2ac9a1f7ddc3be5cd9cec1b4b52d (diff)
downloadstrongswan-eb3e339a3c58b6b1a35907c1d9023beaf7f25aaa.tar.bz2
strongswan-eb3e339a3c58b6b1a35907c1d9023beaf7f25aaa.tar.xz
ikev1: Don't handle DPD timeout job if IKE_SA got passive
While a passively installed IKE_SA does not queue a DPD timeout job, one that switches from active to passive might execute it. Ignore such a queued job if the IKE_SA is in passive state.
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/processing/jobs/dpd_timeout_job.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcharon/processing/jobs/dpd_timeout_job.c b/src/libcharon/processing/jobs/dpd_timeout_job.c
index 9cdce5cab..4c88c13e2 100644
--- a/src/libcharon/processing/jobs/dpd_timeout_job.c
+++ b/src/libcharon/processing/jobs/dpd_timeout_job.c
@@ -63,6 +63,12 @@ METHOD(job_t, execute, job_requeue_t,
this->ike_sa_id);
if (ike_sa)
{
+ if (ike_sa->get_state(ike_sa) == IKE_PASSIVE)
+ {
+ charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
+ return JOB_REQUEUE_NONE;
+ }
+
use_time = ike_sa->get_statistic(ike_sa, STAT_INBOUND);
enumerator = ike_sa->create_child_sa_enumerator(ike_sa);