]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
ike: Fix retransmission timeouts if base is <= 1
authorTobias Brunner <tobias@strongswan.org>
Fri, 5 Jun 2020 11:43:11 +0000 (13:43 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 5 Jun 2020 11:44:00 +0000 (13:44 +0200)
Fixes: 72b282cf202d ("ike: Properly support high number of retransmission tries")
src/libcharon/sa/ikev1/task_manager_v1.c
src/libcharon/sa/ikev2/task_manager_v2.c

index 70cebe73557246f1a1da9a0102c52aa10f2f876d..2a8bcfae7f5f6f09046463e84bf0c82c20a3f40e 100644 (file)
@@ -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 *
index 9c7a5378d3a801f8ea5cd46c563b2f0fa026d1fa..3f0e982a5e72a66d27d51bef900f9d91bfd939ad 100644 (file)
@@ -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 *