[Openvpn-devel,v2] Add check for bind-dev in DCO options

Message ID 20260114160238.31321-1-gert@greenie.muc.de
State New
Headers show
Series [Openvpn-devel,v2] Add check for bind-dev in DCO options | expand

Commit Message

Gert Doering Jan. 14, 2026, 4:02 p.m. UTC
From: Brandon Currell <brandon+git@currell.pw>

Github: OpenVPN/openvpn#683

Change-Id: I5d5fca3f5f7a724b4f9ec98832d3a785459f36a5
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Antonio Quartulli <antonio@mandelbit.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1447
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to release/2.6.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1447
This mail reflects revision 2 of this Change.

Signed-off-by line for the author was added as per our policy.

Acked-by according to Gerrit (reflected above):
Antonio Quartulli <antonio@mandelbit.com>

Comments

Gert Doering Jan. 14, 2026, 6:35 p.m. UTC | #1
As discussed in the GH issue, we do not expect to see support for
--bind-dev in 2.6.x with the old linux "out of kernel" support - so turn off
DCO if --bind-dev is requested.

This patch is only appled to release/2.6, as we *do* expect to have working
--bind-dev support with the "new linux in-kernel DCO" in 2.7.0 and up, so
turning it off there would be the wrong thing (even if the support has not
actually merged to a release kernel yet).

I have not tested this (beyond a quick compile test), but it's straight-
forward enough, and Antonio as primary DCO developer has ACKed it.

I have added your signed-off-by: line to the commit, as per our coding
conventions.

Your patch has been applied to the release/2.6 branch.

commit 30041d6c40c9c0b6aa5581d4570110cde61cad0e (release/2.6)
Author: Brandon Currell
Date:   Wed Jan 14 17:02:32 2026 +0100

     Add check for bind-dev in DCO options

     Signed-off-by: Gert Doering <gert@greenie.muc.de>
     Acked-by: Antonio Quartulli <antonio@mandelbit.com>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1447
     Message-Id: <20260114160238.31321-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35260.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c
index e41d59f..06d5920 100644
--- a/src/openvpn/dco.c
+++ b/src/openvpn/dco.c
@@ -317,6 +317,12 @@ 
         }
     }
 
+    if (o->bind_dev)
+    {
+        msg(msglevel, "Note: bind-dev not supported with DCO, disabling data channel offload");
+        return false;
+    }
+
 #if defined(_WIN32)
     if (o->mode == MODE_SERVER)
     {