Refer to scheduler via hydra and not charon.
This commit is contained in:
+12
-12
@@ -470,7 +470,7 @@ METHOD(ike_sa_t, send_keepalive, void,
|
||||
diff = 0;
|
||||
}
|
||||
job = send_keepalive_job_create(this->ike_sa_id);
|
||||
charon->scheduler->schedule_job(charon->scheduler, (job_t*)job,
|
||||
hydra->scheduler->schedule_job(hydra->scheduler, (job_t*)job,
|
||||
this->keepalive_interval - diff);
|
||||
}
|
||||
|
||||
@@ -605,7 +605,7 @@ METHOD(ike_sa_t, send_dpd, status_t,
|
||||
}
|
||||
/* recheck in "interval" seconds */
|
||||
job = (job_t*)send_dpd_job_create(this->ike_sa_id);
|
||||
charon->scheduler->schedule_job(charon->scheduler, job, delay - diff);
|
||||
hydra->scheduler->schedule_job(hydra->scheduler, job, delay - diff);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -644,7 +644,7 @@ METHOD(ike_sa_t, set_state, void,
|
||||
{
|
||||
this->stats[STAT_REKEY] = t + this->stats[STAT_ESTABLISHED];
|
||||
job = (job_t*)rekey_ike_sa_job_create(this->ike_sa_id, FALSE);
|
||||
charon->scheduler->schedule_job(charon->scheduler, job, t);
|
||||
hydra->scheduler->schedule_job(hydra->scheduler, job, t);
|
||||
DBG1(DBG_IKE, "scheduling rekeying in %ds", t);
|
||||
}
|
||||
t = this->peer_cfg->get_reauth_time(this->peer_cfg);
|
||||
@@ -653,7 +653,7 @@ METHOD(ike_sa_t, set_state, void,
|
||||
{
|
||||
this->stats[STAT_REAUTH] = t + this->stats[STAT_ESTABLISHED];
|
||||
job = (job_t*)rekey_ike_sa_job_create(this->ike_sa_id, TRUE);
|
||||
charon->scheduler->schedule_job(charon->scheduler, job, t);
|
||||
hydra->scheduler->schedule_job(hydra->scheduler, job, t);
|
||||
DBG1(DBG_IKE, "scheduling reauthentication in %ds", t);
|
||||
}
|
||||
t = this->peer_cfg->get_over_time(this->peer_cfg);
|
||||
@@ -675,7 +675,7 @@ METHOD(ike_sa_t, set_state, void,
|
||||
this->stats[STAT_DELETE] += t;
|
||||
t = this->stats[STAT_DELETE] - this->stats[STAT_ESTABLISHED];
|
||||
job = (job_t*)delete_ike_sa_job_create(this->ike_sa_id, TRUE);
|
||||
charon->scheduler->schedule_job(charon->scheduler, job, t);
|
||||
hydra->scheduler->schedule_job(hydra->scheduler, job, t);
|
||||
DBG1(DBG_IKE, "maximum IKE_SA lifetime %ds", t);
|
||||
}
|
||||
|
||||
@@ -688,8 +688,8 @@ METHOD(ike_sa_t, set_state, void,
|
||||
{
|
||||
/* delete may fail if a packet gets lost, so set a timeout */
|
||||
job_t *job = (job_t*)delete_ike_sa_job_create(this->ike_sa_id, TRUE);
|
||||
charon->scheduler->schedule_job(charon->scheduler, job,
|
||||
HALF_OPEN_IKE_SA_TIMEOUT);
|
||||
hydra->scheduler->schedule_job(hydra->scheduler, job,
|
||||
HALF_OPEN_IKE_SA_TIMEOUT);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1262,8 +1262,8 @@ METHOD(ike_sa_t, process_message, status_t,
|
||||
}
|
||||
/* add a timeout if peer does not establish it completely */
|
||||
job = (job_t*)delete_ike_sa_job_create(this->ike_sa_id, FALSE);
|
||||
charon->scheduler->schedule_job(charon->scheduler, job,
|
||||
HALF_OPEN_IKE_SA_TIMEOUT);
|
||||
hydra->scheduler->schedule_job(hydra->scheduler, job,
|
||||
HALF_OPEN_IKE_SA_TIMEOUT);
|
||||
}
|
||||
this->stats[STAT_INBOUND] = time_monotonic(NULL);
|
||||
/* check if message is trustworthy, and update host information */
|
||||
@@ -1718,7 +1718,7 @@ METHOD(ike_sa_t, set_auth_lifetime, void,
|
||||
this->stats[STAT_REAUTH] = reauth_time;
|
||||
DBG1(DBG_IKE, "received AUTH_LIFETIME of %ds, scheduling reauthentication"
|
||||
" in %ds", lifetime, lifetime - reduction);
|
||||
charon->scheduler->schedule_job(charon->scheduler,
|
||||
hydra->scheduler->schedule_job(hydra->scheduler,
|
||||
(job_t*)rekey_ike_sa_job_create(this->ike_sa_id, TRUE),
|
||||
lifetime - reduction);
|
||||
}
|
||||
@@ -1919,9 +1919,9 @@ METHOD(ike_sa_t, inherit, status_t,
|
||||
this->stats[STAT_DELETE] = this->stats[STAT_REAUTH] + delete;
|
||||
DBG1(DBG_IKE, "rescheduling reauthentication in %ds after rekeying, "
|
||||
"lifetime reduced to %ds", reauth, delete);
|
||||
charon->scheduler->schedule_job(charon->scheduler,
|
||||
hydra->scheduler->schedule_job(hydra->scheduler,
|
||||
(job_t*)rekey_ike_sa_job_create(this->ike_sa_id, TRUE), reauth);
|
||||
charon->scheduler->schedule_job(charon->scheduler,
|
||||
hydra->scheduler->schedule_job(hydra->scheduler,
|
||||
(job_t*)delete_ike_sa_job_create(this->ike_sa_id, TRUE), delete);
|
||||
}
|
||||
/* we have to initate here, there may be new tasks to handle */
|
||||
|
||||
Reference in New Issue
Block a user