[Openvpn-devel,10/28] Remove EXPONENTIAL_BACKOFF define

Message ID 20220422142953.3805364-1-arne@rfc2549.org
State Accepted
Headers show
Series Stateless three-way handshake and control channel improvements | expand

Commit Message

Arne Schwabe April 22, 2022, 4:29 a.m. UTC
We have EXPONENTIAL_BACKOFF as default forever (8c47de7, 2.1.1c,
2010). Remove the other code path that is dead code.
---
 src/openvpn/reliable.c | 5 -----
 src/openvpn/reliable.h | 2 --
 2 files changed, 7 deletions(-)

Comments

Gert Doering April 22, 2022, 7:21 a.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

trivial enough :-) - lightly tested.

Your patch has been applied to the master branch.

commit b372463931ed706005214c61ffeb75ff313bee22
Author: Arne Schwabe
Date:   Fri Apr 22 16:29:35 2022 +0200

     Remove EXPONENTIAL_BACKOFF define

     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20220422142953.3805364-1-arne@rfc2549.org>
     URL: https://www.mail-archive.com/search?l=mid&q=20220422142953.3805364-1-arne@rfc2549.org
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/reliable.c b/src/openvpn/reliable.c
index 2aae152bb..d8711f7dc 100644
--- a/src/openvpn/reliable.c
+++ b/src/openvpn/reliable.c
@@ -602,14 +602,9 @@  reliable_send(struct reliable *rel, int *opcode)
     }
     if (best)
     {
-#ifdef EXPONENTIAL_BACKOFF
         /* exponential backoff */
         best->next_try = local_now + best->timeout;
         best->timeout *= 2;
-#else
-        /* constant timeout, no backoff */
-        best->next_try = local_now + best->timeout;
-#endif
         best->n_acks = 0;
         *opcode = best->opcode;
         dmsg(D_REL_DEBUG, "ACK reliable_send ID " packet_id_format " (size=%d to=%d)",
diff --git a/src/openvpn/reliable.h b/src/openvpn/reliable.h
index cf6de0506..b045410a7 100644
--- a/src/openvpn/reliable.h
+++ b/src/openvpn/reliable.h
@@ -41,8 +41,6 @@ 
  *  @{ */
 
 
-#define EXPONENTIAL_BACKOFF
-
 #define RELIABLE_ACK_SIZE 8     /**< The maximum number of packet IDs
                                  *   waiting to be acknowledged which can
                                  *   be stored in one \c reliable_ack