The DCO logic is uanble to proceed without --dev argument, therefore
just disable DCO if no --dev was specified by the user.

Right now, calling openvpn with DCO enabled (default) and no --dev
specified leads to a crash, because --dev is assumed to always be there.

Reported-by: Frank Lichtenheld <fr...@lichtenheld.com>
Signed-off-by: Antonio Quartulli <a...@unstable.cc>
---
 src/openvpn/dco.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c
index b3fd135f..a3a081b2 100644
--- a/src/openvpn/dco.c
+++ b/src/openvpn/dco.c
@@ -109,6 +109,11 @@ dco_check_option_conflict(int msglevel, const struct 
options *o)
         return false;
     }
 
+    if (!o->dev)
+    {
+        return false;
+    }
+
     if (!dco_check_option_conflict_platform(msglevel, o))
     {
         return false;
-- 
2.35.1



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to