[Openvpn-devel] dco: disable dco on Windows if --remote is not defined

Message ID 20221201125902.400-1-lstipakov@gmail.com
State Accepted
Headers show
Series [Openvpn-devel] dco: disable dco on Windows if --remote is not defined | expand

Commit Message

Lev Stipakov Dec. 1, 2022, 12:59 p.m. UTC
From: Lev Stipakov <lev@openvpn.net>

At the moment Windows driver requires remote to work.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
 src/openvpn/dco.c | 8 ++++++++
 1 file changed, 8 insertions(+)


Gert Doering Dec. 1, 2022, 3:19 p.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

"DCO WIN wants to do outgoing stuff", no server, no no-remote - so yes,
makes sense.

Your patch has been applied to the master branch.

commit fd1c460ccfa38ca03e40e05524e2627917c58647
Author: Lev Stipakov
Date:   Thu Dec 1 14:59:02 2022 +0200

     dco: disable dco on Windows if --remote is not defined

     Signed-off-by: Lev Stipakov <lev@openvpn.net>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20221201125902.400-1-lstipakov@gmail.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25604.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>

kind regards,

Gert Doering


diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c
index 47fb0003..19a449ba 100644
--- a/src/openvpn/dco.c
+++ b/src/openvpn/dco.c
@@ -251,6 +251,14 @@  dco_check_option_ce(const struct connection_entry *ce, int msglevel)
+#if defined(_WIN32)
+    if (!ce->remote)
+    {
+        msg(msglevel, "NOTE: --remote is not defined, disabling data channel offload.");
+        return false;
+    }
     return true;