ikev1: Fix calculation of DPD timeout

A DPD timeout job is queued whenever a DPD is sent, i.e. after the
DPD delay already has elapsed, so we have to compensate for that.
This commit is contained in:
Tobias Brunner 2015-11-05 15:14:56 +01:00
parent f36b6d49af
commit 747b64875f

View File

@ -1802,6 +1802,8 @@ METHOD(task_manager_t, queue_dpd, void,
pow(this->retransmit_base, retransmit));
}
}
/* compensate for the already elapsed dpd delay */
t -= 1000 * peer_cfg->get_dpd(peer_cfg);
/* schedule DPD timeout job */
lib->scheduler->schedule_job_ms(lib->scheduler,