]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Reenable xmit_hold when using p2p tcp-server and tls-server
authorArne Schwabe <arne@rfc2549.org>
Mon, 10 Aug 2026 11:42:06 +0000 (13:42 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 10 Aug 2026 12:19:33 +0000 (14:19 +0200)
Commit 619c3e9 changed the logic to enable xmit_hold only
when c->mode is CM_CHILD_TCP. This works for --mode server and
was probably done to allow to properly work when the server
is listening on multiple sockets and options->ce.proto cannot be used
to determine if this socket is tcp or udp.

Restore the logic for p2p to avoid both sides starting sending
resets at the same time.

Github: closes OpenVPN/openvpn#1089
Change-Id: I728067ef08481c87c7b6918c88ebcaeeec466534
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: MaxF <max@max-fillinger.net>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1837
Message-Id: <20260810114212.28379-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg38265.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/init.c

index 69d226d3e8a2d08b5450785f0ada803cdeb28cdd..08278fc2e121980f824bb34e1b7368e48552fded 100644 (file)
@@ -3332,7 +3332,7 @@ do_init_crypto_tls(struct context *c, const unsigned int flags)
 
     /* should we not xmit any packets until we get an initial
      * response from client? */
-    if (to.server && c->mode == CM_CHILD_TCP)
+    if (to.server && (c->mode == CM_CHILD_TCP || (c->mode == CM_P2P && options->ce.proto == PROTO_TCP_SERVER)))
     {
         to.xmit_hold = true;
     }