From: Antonio Quartulli Date: Mon, 1 Aug 2022 17:08:12 +0200 Message-Id: <20220801150812.32561-1-a@...2181...> MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH] disable DCO if no --dev was specified List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net Cc: Antonio Quartulli , Frank Lichtenheld 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 Signed-off-by: Antonio Quartulli --- 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