From: Antonio Quartulli Date: Mon, 1 Aug 2022 15:08:12 +0000 (+0200) Subject: disable DCO if no --dev was specified X-Git-Tag: v2.6_beta1~146 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8b0a95efff0184cebacc43a6e751fa8f9092cd8;p=thirdparty%2Fopenvpn.git disable DCO if no --dev was specified The DCO logic is unable 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 Acked-by: Gert Doering Message-Id: <20220801150812.32561-1-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24772.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 0471e4d0b..b0dd922a1 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -164,6 +164,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;