summaryrefslogtreecommitdiff
path: root/src/libcharon/processing/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/processing/jobs')
-rw-r--r--src/libcharon/processing/jobs/delete_ike_sa_job.c3
-rw-r--r--src/libcharon/processing/jobs/initiate_mediation_job.c21
-rw-r--r--src/libcharon/processing/jobs/start_action_job.c4
3 files changed, 24 insertions, 4 deletions
diff --git a/src/libcharon/processing/jobs/delete_ike_sa_job.c b/src/libcharon/processing/jobs/delete_ike_sa_job.c
index a394e9df9..53a170510 100644
--- a/src/libcharon/processing/jobs/delete_ike_sa_job.c
+++ b/src/libcharon/processing/jobs/delete_ike_sa_job.c
@@ -93,7 +93,8 @@ METHOD(job_t, execute, job_requeue_t,
}
else
{
- DBG1(DBG_JOB, "deleting half open IKE_SA after timeout");
+ DBG1(DBG_JOB, "deleting half open IKE_SA with %H after "
+ "timeout", ike_sa->get_other_host(ike_sa));
charon->bus->alert(charon->bus, ALERT_HALF_OPEN_TIMEOUT);
charon->ike_sa_manager->checkin_and_destroy(
charon->ike_sa_manager, ike_sa);
diff --git a/src/libcharon/processing/jobs/initiate_mediation_job.c b/src/libcharon/processing/jobs/initiate_mediation_job.c
index 6c01ffe95..1082eae0b 100644
--- a/src/libcharon/processing/jobs/initiate_mediation_job.c
+++ b/src/libcharon/processing/jobs/initiate_mediation_job.c
@@ -82,8 +82,25 @@ METHOD(job_t, initiate, job_requeue_t,
charon->ike_sa_manager->checkin(charon->ike_sa_manager, mediated_sa);
- mediation_cfg = mediated_cfg->get_mediated_by(mediated_cfg);
- mediation_cfg->get_ref(mediation_cfg);
+ mediation_cfg = charon->backends->get_peer_cfg_by_name(charon->backends,
+ mediated_cfg->get_mediated_by(mediated_cfg));
+ if (!mediation_cfg)
+ {
+ DBG1(DBG_IKE, "mediation connection '%s' not found, aborting",
+ mediated_cfg->get_mediated_by(mediated_cfg));
+ mediated_cfg->destroy(mediated_cfg);
+ return JOB_REQUEUE_NONE;
+ }
+ if (!mediation_cfg->is_mediation(mediation_cfg))
+ {
+ DBG1(DBG_CFG, "connection '%s' as referred to by '%s' is no "
+ "mediation connection, aborting",
+ mediated_cfg->get_mediated_by(mediated_cfg),
+ mediated_cfg->get_name(mediated_cfg));
+ mediated_cfg->destroy(mediated_cfg);
+ mediation_cfg->destroy(mediation_cfg);
+ return JOB_REQUEUE_NONE;
+ }
enumerator = mediation_cfg->create_auth_cfg_enumerator(mediation_cfg,
TRUE);
diff --git a/src/libcharon/processing/jobs/start_action_job.c b/src/libcharon/processing/jobs/start_action_job.c
index 5e88ac230..654ec6abe 100644
--- a/src/libcharon/processing/jobs/start_action_job.c
+++ b/src/libcharon/processing/jobs/start_action_job.c
@@ -68,7 +68,9 @@ METHOD(job_t, execute, job_requeue_t,
mode = child_cfg->get_mode(child_cfg);
if (mode == MODE_PASS || mode == MODE_DROP)
{
- charon->shunts->install(charon->shunts, child_cfg);
+ charon->shunts->install(charon->shunts,
+ peer_cfg->get_name(peer_cfg),
+ child_cfg);
}
else
{