From: Tobias Brunner Date: Fri, 5 Jun 2020 11:43:11 +0000 (+0200) Subject: ike: Fix retransmission timeouts if base is <= 1 X-Git-Tag: 5.9.0dr1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62367f2c013f1a2a03a95bce506a421deb9f2032;p=thirdparty%2Fstrongswan.git ike: Fix retransmission timeouts if base is <= 1 Fixes: 72b282cf202d ("ike: Properly support high number of retransmission tries") --- diff --git a/src/libcharon/sa/ikev1/task_manager_v1.c b/src/libcharon/sa/ikev1/task_manager_v1.c index 70cebe7355..2a8bcfae7f 100644 --- a/src/libcharon/sa/ikev1/task_manager_v1.c +++ b/src/libcharon/sa/ikev1/task_manager_v1.c @@ -372,7 +372,7 @@ static status_t retransmit_packet(private_task_manager_t *this, uint32_t seqnr, charon->bus->alert(charon->bus, ALERT_RETRANSMIT_SEND_TIMEOUT, packet); return DESTROY_ME; } - if (this->retransmit_tries_max && + if (!this->retransmit_tries_max || retransmitted <= this->retransmit_tries_max) { t = (uint32_t)(this->retransmit_timeout * 1000.0 * diff --git a/src/libcharon/sa/ikev2/task_manager_v2.c b/src/libcharon/sa/ikev2/task_manager_v2.c index 9c7a5378d3..3f0e982a5e 100644 --- a/src/libcharon/sa/ikev2/task_manager_v2.c +++ b/src/libcharon/sa/ikev2/task_manager_v2.c @@ -373,7 +373,7 @@ METHOD(task_manager_t, retransmit, status_t, packet); return DESTROY_ME; } - if (this->retransmit_tries_max && + if (!this->retransmit_tries_max || this->initiating.retransmitted <= this->retransmit_tries_max) { timeout = (uint32_t)(this->retransmit_timeout * 1000.0 *