From patchwork Mon Sep 14 13:29:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 1452 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id aIf2Hkn9X1/gEwAAIUCqbw (envelope-from ) for ; Mon, 14 Sep 2020 19:31:21 -0400 Received: from proxy9.mail.ord1d.rsapps.net ([172.30.191.6]) by director11.mail.ord1d.rsapps.net with LMTP id KLHVHkn9X19GUwAAvGGmqA (envelope-from ) for ; Mon, 14 Sep 2020 19:31:21 -0400 Received: from smtp2.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy9.mail.ord1d.rsapps.net with LMTPS id oP+bHkn9X18nXQAA7h+8OQ (envelope-from ) for ; Mon, 14 Sep 2020 19:31:21 -0400 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: smtp2.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=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: 6500610a-f6e2-11ea-b3a4-5254004a0287-1-1 Received: from [216.105.38.7] ([216.105.38.7:45800] helo=lists.sourceforge.net) by smtp2.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 6D/3B-25831-94DFF5F5; Mon, 14 Sep 2020 19:31:21 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kHxvE-00085R-0B; Mon, 14 Sep 2020 23:30:08 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHxvC-00085H-Kh for openvpn-devel@lists.sourceforge.net; Mon, 14 Sep 2020 23:30:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding: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=4v3flLNeEME4qPjlDG0RDEwhhbuXZT0Lk+/c7a07izQ=; b=NbYmDP+5EROybntLoU8mIGaq0J htL2uO7zoHOgje+USx99TmN3X2+DAa5CdRGGJPtzbiiV7v45mTnR/VXm5kwhNivREDOtZ5BuByUKd YAz+CsB4YiItO4daGuUdwuJwh39yOo9hTt0+TQXH1qlAPKZHJSwo9jtMECZKvz7Hn348=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding: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=4v3flLNeEME4qPjlDG0RDEwhhbuXZT0Lk+/c7a07izQ=; b=kjoGWEKBWhl/pDAwZII3PHpnqS yesInrs3EpJFafxj0EQe7RLgTBCIPkKd4dy9y/0gapQtjGVZ8nUjozNnsr3poVZFA4uk3+wgU7OBh VyCkjIeZXXbhZnH/KfLj/HKgD2PN5aukpVoI0MzoirQJSqmQylKMnRcK2OQw1sD+QRP0=; Received: from mail-qt1-f195.google.com ([209.85.160.195]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1kHxv6-009tzW-Kt for openvpn-devel@lists.sourceforge.net; Mon, 14 Sep 2020 23:30:06 +0000 Received: by mail-qt1-f195.google.com with SMTP id c18so1759682qtw.5 for ; Mon, 14 Sep 2020 16:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=4v3flLNeEME4qPjlDG0RDEwhhbuXZT0Lk+/c7a07izQ=; b=XA4gs0qt8NQDKiREmUVBUgxCibttPxwxTIo+tcZFPPFEHWou+9K5iIzwDO0CG5cbGd vxvdYqfi4BjgY8AUUc0ARfTIG0J7ibVxliLwQ25NJRmFsbkyYxC7iPT55E6d4CbV7hQE EL+7A5j7VNSkEp5Vn2L2flElZt3Z+8qiTiZ6ZFw8l5iG5LekKr/IcvDtcOdePTdumo5M eiDa3WDdrSu0y5mvVPW5W+rETH8pnbRHLuXHcPQaxpweVOpYWLK8ZyNljh4ytDWoZ4Qh t3wUJt3FVSNUfCX+gvnlwemILGYm8LNLzaX+wreU3cKQ+Pv0siGvuJPFRiauA2L5m1Nz Wx9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4v3flLNeEME4qPjlDG0RDEwhhbuXZT0Lk+/c7a07izQ=; b=Dp8Ci/HHwp2ibI6EDlBFfmD/1sZHlffJyk9dN9fdMZJBRkYpRKX61p9eB6fFQv9lQl qo+JlekNlaeHC+q1+K7+qqx8QuxPJsrvAu36//vnLhBIBS6wQOYL4ssXYLh7zqbRs2JE cSS/pIGyEjUb9xxAWFSDQFXHIylnajXpRaUpmN637ZsgrvJ8ROYxLIE1VhVAlo/mksof w6Ynnm2Pc/Paj173x/BJgWWVAE91XK1uk9mIl+RgX4DULsb1qWqd174BSaolyE4msn1G iLAvUWfkzRR7lk9ioS03R8qShhfIKLwC8qs1fzrDwxWZLsp8jhZY1L/EdJ2/bz6Gd+aJ tVeA== X-Gm-Message-State: AOAM530AcTVY58LrnHla2FHOcfqr/pTNMAlEZEOBnz3QRpEBy6z7uS2X GTyYJ5EQ9rYxjfjvh04Ha9hnRTObiJs= X-Google-Smtp-Source: ABdhPJwRhvbkZbt7PsYf1jswIpNcvIeFiiTWIpmRyxL6Sv468KkhTdBp+I1GqEhNicCgUZ8ShfriKg== X-Received: by 2002:ac8:614b:: with SMTP id d11mr15750612qtm.271.1600126187446; Mon, 14 Sep 2020 16:29:47 -0700 (PDT) Received: from saturn.home.sansel.ca (CPE40167ea0e1c2-CM788df74daaa0.cpe.net.cable.rogers.com. [99.228.34.11]) by smtp.gmail.com with ESMTPSA id l11sm14518351qkk.35.2020.09.14.16.29.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2020 16:29:46 -0700 (PDT) From: selva.nair@gmail.com To: openvpn-devel@lists.sourceforge.net Date: Mon, 14 Sep 2020 19:29:41 -0400 Message-Id: <1600126181-16364-1-git-send-email-selva.nair@gmail.com> X-Mailer: git-send-email 2.1.4 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (selva.nair[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.160.195 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.160.195 listed in wl.mailspike.net] -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 RCVD_IN_MSPIKE_WL Mailspike good senders X-Headers-End: 1kHxv6-009tzW-Kt Subject: [Openvpn-devel] [PATCH] Allow --dhcp-option in config file when windows-driver is wintun 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: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Selva Nair When wintun is in use we mutate ip_win32_type to NETSH and then complain that ip-win32 option should be dynamic or adaptive if any --dhcp-option directive is present in the config file. This causes a fatal error. How to reproduce: specify a --dhcp-option in the config and change the --windows-driver to wintun. Fix this behaviour. A typo in the message is also corrected. Signed-off-by: Selva Nair Acked-by: Lev Stipakov --- src/openvpn/options.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 8bf82c5..4b22d3d 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2181,10 +2181,11 @@ options_postprocess_verify_ce(const struct options *options, const struct connec } if (options->tuntap_options.dhcp_options + && options->windows_driver != WINDOWS_DRIVER_WINTUN && options->tuntap_options.ip_win32_type != IPW32_SET_DHCP_MASQ && options->tuntap_options.ip_win32_type != IPW32_SET_ADAPTIVE) { - msg(M_USAGE, "--dhcp-options requires --ip-win32 dynamic or adaptive"); + msg(M_USAGE, "--dhcp-option requires --ip-win32 dynamic or adaptive"); } if (options->windows_driver == WINDOWS_DRIVER_WINTUN && dev != DEV_TYPE_TUN)