diff options
author | Tobias Brunner <tobias@strongswan.org> | 2015-11-05 15:14:56 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2015-11-09 15:18:34 +0100 |
commit | 747b64875f1577654d06a0d1517acfb8e3051c47 (patch) | |
tree | 934c7294b6889e2e7f52afe1a716a0e48b28d017 /src | |
parent | f36b6d49af0833bdb8134683c336416836de20f9 (diff) | |
download | strongswan-747b64875f1577654d06a0d1517acfb8e3051c47.tar.bz2 strongswan-747b64875f1577654d06a0d1517acfb8e3051c47.tar.xz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/sa/ikev1/task_manager_v1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcharon/sa/ikev1/task_manager_v1.c b/src/libcharon/sa/ikev1/task_manager_v1.c index a839f51e7..3c601a4fa 100644 --- a/src/libcharon/sa/ikev1/task_manager_v1.c +++ b/src/libcharon/sa/ikev1/task_manager_v1.c @@ -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, |