[Openvpn-devel] Move IV_TCPNL from comp_generate_peer_info_string to push_peer_info

Message ID 20211114130311.4043536-1-arne@rfc2549.org
State Accepted
Headers show
Series [Openvpn-devel] Move IV_TCPNL from comp_generate_peer_info_string to push_peer_info | expand

Commit Message

Arne Schwabe Nov. 14, 2021, 2:03 a.m. UTC
This IV variable has nothing to do with compression and should not
depend if OpenVPN is compiled with USE_COMP. So move it to the
other generic IV variables.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
 src/openvpn/comp.c | 1 -
 src/openvpn/ssl.c  | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)


Gert Doering Nov. 14, 2021, 3:10 a.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

"because it makes sense".

Briefly tested if it's still sent to the server (it is).  Not much 
else to see here :-)

Your patch has been applied to the master branch.

commit 648e871e50e76586d65a267cf598d8f1ec0d0057
Author: Arne Schwabe
Date:   Sun Nov 14 14:03:11 2021 +0100

     Move IV_TCPNL from comp_generate_peer_info_string to push_peer_info

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20211114130311.4043536-1-arne@rfc2549.org>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23182.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>

kind regards,

Gert Doering


diff --git a/src/openvpn/comp.c b/src/openvpn/comp.c
index 72b1511ea..ad49b00b9 100644
--- a/src/openvpn/comp.c
+++ b/src/openvpn/comp.c
@@ -169,7 +169,6 @@  comp_generate_peer_info_string(const struct compress_options *opt, struct buffer
         buf_printf(out, "IV_COMP_STUB=1\n");
         buf_printf(out, "IV_COMP_STUBv2=1\n");
-        buf_printf(out, "IV_TCPNL=1\n");
diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index 7a09272c8..4d107016a 100644
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/ssl.c
@@ -2184,6 +2184,9 @@  push_peer_info(struct buffer *buf, struct tls_session *session)
 #elif defined(_WIN32)
         buf_printf(&out, "IV_PLAT=win\n");
+        /* Announce that we do not require strict sequence numbers with
+         * TCP. (TCP non-linear) */
+        buf_printf(&out, "IV_TCPNL=1\n");
     /* These are the IV variable that are sent to peers in p2p mode */