From patchwork Wed Feb 5 07:49:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Rozman X-Patchwork-Id: 979 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director7.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id uC9qF4oOO15BbQAAIUCqbw for ; Wed, 05 Feb 2020 13:50:50 -0500 Received: from proxy4.mail.ord1d.rsapps.net ([172.30.191.6]) by director7.mail.ord1d.rsapps.net with LMTP id WOMlF4oOO17dWQAAovjBpQ ; Wed, 05 Feb 2020 13:50:50 -0500 Received: from smtp8.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy4.mail.ord1d.rsapps.net with LMTP id eNmNFooOO17tMwAAiYrejw ; Wed, 05 Feb 2020 13:50:50 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp8.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=rozman.si; dmarc=fail (p=none; dis=none) header.from=rozman.si X-Suspicious-Flag: YES X-Classification-ID: 6cb95ddc-4848-11ea-9d04-5254001e5a60-1-1 Received: from [216.105.38.7] ([216.105.38.7:35302] helo=lists.sourceforge.net) by smtp8.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 11/B5-09334-98E0B3E5; Wed, 05 Feb 2020 13:50:49 -0500 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1izPkC-0004QQ-La; Wed, 05 Feb 2020 18:49:48 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1izPkC-0004QK-0t for openvpn-devel@lists.sourceforge.net; Wed, 05 Feb 2020 18:49:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TIBNqDXZLKK1t8TqPIvxFFRfDXViNmyW1bfBhm1MOmk=; b=EUzohiqegGJVWoMErpsVRhRxf5 AKgaoKY32rLFuJStWBMIFjph2vUyJ8+Y7tJP5D+F1sEA0D7t97uvjxo0IMoBWk4l4EnX9MC6s96NP bb15JuVD4tiJ4KNmEcB5NfQLpA+prSbePllq/Tg0FoNXBVwp2Q+WkoTZogiZMUlQ0Yfk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=TIBNqDXZLKK1t8TqPIvxFFRfDXViNmyW1bfBhm1MOmk=; b=e iy3Kma/9t62NKOHZJZnYZIf4uqLCd9dWsKfhqs6IzH5agwcYymkVWA7xRCaN/l+/QfZ5pfDRQVPVE TR64TdXhD7nYvE/BjeDcByZrOjbE1ifWE03oHi3Oegg0mHosOf1WH0+hRrMofI4GwUUyrBT4F4xmH GBjattguyBiB72eg=; Received: from pub5.amebis.si ([213.250.55.21]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1izPk8-00BE4D-33 for openvpn-devel@lists.sourceforge.net; Wed, 05 Feb 2020 18:49:47 +0000 Received: by pub5.amebis.si (Postfix, from userid 1000) id 8EEC11002FBE; Wed, 5 Feb 2020 19:49:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rozman.si; s=default; t=1580928570; bh=TIBNqDXZLKK1t8TqPIvxFFRfDXViNmyW1bfBhm1MOmk=; h=From:To:Cc:Subject:Date:From; b=BECBPi+2/LCdn48/Kb0dP2SXwgOok1v9qHU8vPBz9oAH4IyAhiRo3taAvT+stuCvg xcnZqB/HVeK3NiKrn/PAqQZ0DoU/Qu1lVIPeCsin1ZMCD8S5kNp0WIS50NbBi1Zfz8 HL7fr2kfmTcipfli3jVTuXYS23jZOlr6pCJ3zub4= X-Spam-Checker-Version: SpamAssassin 3.4.3 (2019-12-06) on brana.amebis.doma X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.3 Received: from SR6.amebis.doma (unknown [IPv6:2a00:ee2:209:164:dc1d:9533:3ace:bf6b]) by pub5.amebis.si (Postfix) with ESMTP id 2BC651002FB5; Wed, 5 Feb 2020 19:49:28 +0100 (CET) From: Simon Rozman To: openvpn-devel@lists.sourceforge.net Date: Wed, 5 Feb 2020 19:49:22 +0100 Message-Id: <20200205184922.883-1-simon@rozman.si> X-Mailer: git-send-email 2.24.1.windows.2 MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: rozman.si] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1izPk8-00BE4D-33 Subject: [Openvpn-devel] [PATCH] wintun: check for conflicting options X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox `--windows-driver wintun` requires `--dev tun`. This is now checked and documented. Signed-off-by: Simon Rozman Acked-by: Lev Stipakov --- doc/openvpn.8 | 4 ++++ src/openvpn/options.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/openvpn.8 b/doc/openvpn.8 index 8feb3b9c..e2227a47 100644 --- a/doc/openvpn.8 +++ b/doc/openvpn.8 @@ -6257,6 +6257,10 @@ Specifies which tun driver to use. Values are (default) and .B wintun. This is Windows-only option. +"wintun" requires +.B \-\-dev tun +and the OpenVPN process to run elevated, or be invoked using +the Interactive Service. .\"********************************************************* .TP .B \-\-dhcp\-renew diff --git a/src/openvpn/options.c b/src/openvpn/options.c index c459b260..101cca38 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2204,7 +2204,12 @@ options_postprocess_verify_ce(const struct options *options, const struct connec { msg(M_USAGE, "--dhcp-options requires --ip-win32 dynamic or adaptive"); } -#endif + + if (options->windows_driver == WINDOWS_DRIVER_WINTUN && dev != DEV_TYPE_TUN) + { + msg(M_USAGE, "--windows-driver wintun requires --dev tun"); + } +#endif /* ifdef _WIN32 */ /* * Check that protocol options make sense.