From patchwork Fri Nov 10 10:22:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "its_Giaan (Code Review)" X-Patchwork-Id: 3421 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:50e4:b0:f2:62eb:61c1 with SMTP id r4csp1067656dyd; Fri, 10 Nov 2023 02:23:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGNA9RKGnm+VOrHAkwSPEMZABT8Rp5TUjzuC0J4lAsvhdZit34qL6TDBXOauvGqdKtP1uCS X-Received: by 2002:a05:6808:201a:b0:3ad:af12:2fe0 with SMTP id q26-20020a056808201a00b003adaf122fe0mr8652841oiw.3.1699611787811; Fri, 10 Nov 2023 02:23:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699611787; cv=none; d=google.com; s=arc-20160816; b=kensZU/sjfPaIugrYd53vGQ43dIyPDBScGWulc4V/7C9e14ekgSRWWLXHXwnzxXTEP KS+ZNM6u/rQFy+xACLn5tkI+qynUYE5DqboVubRjGDcIKCg7Y8bvbsKZk1MJJhUpXmeW N4+E5uUmESBWqa20X8fqO75EOhvu2RWeJ45IiU3JQOaFxqxj4AuI4ZA5vEzJIznqYcmT LD6ycX5tDT8SQKcnUeU20erXQtJAWm2P9hosvCnVnmoDVGUpLuNKG8vATnxzMc6el+MT JkDAJwoaAh2ViQ0rH7Yp7GWaP8cWbmFEMXJwsHi3sPQ+xMPUMKnq6e1Np1wQ/98XtX9f ppkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=mbSWZPIjzpZpBw41DXMkSR1kN2Iub5TLuvMBJ6ohp/c=; fh=U7wEyxtwz2o5+UdevFSA47vNeG9knhWH0KV//QhD5a0=; b=OwvdKopGienIht+cahbckiMPpAkgmhd58IEY2GS1Vu/g9nJQUFFKr6nZUbFyMxm1rG QbJ2m3v1p+OscVLxw3kZajd5I8dsUdBazMd2h8G0O2zZXgcgLRA/V8Xaa9rZYs2H2Sq+ ja2XGEx5fxf4rJoKkRYgm5jVOBnIBrb2wljJRTRojLSuw0spiih42hEMiUv++T27Tj/N idBAEdPUrHhji91wq5UkkqGk0ZNCccF4FSlWP14Gd5jVYLr2yeG0EWnTk1jcFPBtvAcP 5X9Di39ZNRopc13w+QJpaU6M79RvBczyycM8ZpB7nHwZewxodfUwtSm+ljv7T6y1nDwT bVZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=dF3dVfbc; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=VPoxlQzk; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=EFNDPsij; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id cb13-20020a056a02070d00b005bddb7249e0si7131131pgb.313.2023.11.10.02.23.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Nov 2023 02:23:07 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=dF3dVfbc; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=VPoxlQzk; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=EFNDPsij; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net 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.95) (envelope-from ) id 1r1OeV-0004KA-TH; Fri, 10 Nov 2023 10:22:15 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1r1OeT-0004K3-E6 for openvpn-devel@lists.sourceforge.net; Fri, 10 Nov 2023 10:22:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uyGDeMRjhTNIsXTKdQP56hD+v1ZVsymDehxwqlBpuMY=; b=dF3dVfbcn7a/PYlDhrJLMk52td NnXebPj1Bd7++gF+RjelfdJd4MXUbZVz1uComS7lTt+V9RDKGzriSgbrixvP63Dg43TDsL6CTpz6d oCdh+/5VOhR7FX8OTfJ64c4eSuxgxjW2uHMAg99M+DVYoukTIBnNAIdb7UUK75S6RHN8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=uyGDeMRjhTNIsXTKdQP56hD+v1ZVsymDehxwqlBpuMY=; b=V PoxlQzkgo1BBlwFIrU0Ak8IWGpqVcu2mgQZPpK9UQSUvV5r1auec1iMkLLkIvSz3we4/i9VH1HZqp qstLKucFSRtZ0iEiEBxpC2QoxKVSPtVaCqFuUL9FFVRfZin1y5OyWWzVApnPiX+5S7qmtIkHfJQJz uBPODywByG3kDc+4=; Received: from mail-wm1-f43.google.com ([209.85.128.43]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1r1OeP-000riO-Hm for openvpn-devel@lists.sourceforge.net; Fri, 10 Nov 2023 10:22:13 +0000 Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-40839807e82so11457395e9.0 for ; Fri, 10 Nov 2023 02:22:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1699611723; x=1700216523; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=uyGDeMRjhTNIsXTKdQP56hD+v1ZVsymDehxwqlBpuMY=; b=EFNDPsijW1sBm9VYBdis3KYWfWYgv/ATfDXUptw+vhAwLeeDFbWmIbz6S8wiYA7M6X pyHTGBuZphGjmMRhQv9iiXuhYilRyaA5rt915B2/5EHI9tH0ThFlRUVqPcylCYCpvrVZ QnAT0zgkojE1BkiinAtQujFarX3iXfmnK85UdPABPUqiYrVIvYcT3yGTiDlmk7QMAH+4 2BGfJBN4qD4ugcUZhi4fCV+lJsqfCOctfq1W5qDBt5PvJiKqa6FFp/ltNyVks+CwMsGv FgbOcWzTU99pReknDA3I/KT1UAB5GIGI2ekiBuEKiytpwoZbiwtL6GsQV+riRzCTh1ix Zr3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699611723; x=1700216523; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uyGDeMRjhTNIsXTKdQP56hD+v1ZVsymDehxwqlBpuMY=; b=VXeapHmtf1B9n+/+wzpJEw0ERfKC9EXxCFkxDZXk5zu7EQwFYOOai7N/dzWgYi5x2u 8ZLAfsZpfQw2/mgd/nIktOSUk3YUD4Mk/yZeia9ftW/xSpgztcRcJbgwsrReI+aK+Niy zA9jOMtM3y7QL8cBrdIn+oPFAqY+c3u8dkolpatZ/YHgD3gyRlplXVOyCKFf+mJcyaN9 HD0Go+fwraV55bTCmC3aYTK4HVvuiWyDofcLusyyHTD+NNjUvXciV5RJrRWuaPUxuq4b +miA6DTFh/Q5/n8ugjjuO5Bw3J6AqKQTnJJDYDemDp/HHvACQYWX5lKHbJsYNkqRfhMn a7Xw== X-Gm-Message-State: AOJu0Yy3LYUBsox4iobFkFEaVoDaPgd3Hb/NXTneEeXgnGUQbC2lw2Im lTba0rMovPNZFmrIFJyo1q6pjFfvyeNx3OdgOPE= X-Received: by 2002:a05:600c:46ca:b0:408:369a:dad1 with SMTP id q10-20020a05600c46ca00b00408369adad1mr2310702wmo.4.1699611722962; Fri, 10 Nov 2023 02:22:02 -0800 (PST) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id p2-20020adfcc82000000b0031ad5fb5a0fsm1595323wrj.58.2023.11.10.02.22.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 02:22:02 -0800 (PST) From: "stipa (Code Review)" X-Google-Original-From: "stipa (Code Review)" X-Gerrit-PatchSet: 1 Date: Fri, 10 Nov 2023 10:22:01 +0000 To: plaisthos , flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I24f43ad319bd1ca530fe17442d02a97412eb75c7 X-Gerrit-Change-Number: 423 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: df4acf0b27ce33f3a1d018128e664baba9728bdc References: Message-ID: <0cc2f4aee0de22a0a54cf7c9761de5de4cf1c819-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.43 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.43 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.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1r1OeP-000riO-Hm Subject: [Openvpn-devel] [XS] Change in openvpn[release/2.6]: Make --dns options apply for tap-windows6 driver 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: , Reply-To: lstipakov@gmail.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1782172129877644275?= X-GMAIL-MSGID: =?utf-8?q?1782172129877644275?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/423?usp=email to review the following change. Change subject: Make --dns options apply for tap-windows6 driver ...................................................................... Make --dns options apply for tap-windows6 driver When tap-windows6 driver is used, both --dhcp-option and --dns options are applied with DHCP. When processing --dns options, we don't set "tuntap_options.dhcp_options" member, which is required for DHCP string to be sent to the driver. As a result, --dns options are not applied at all. Fix by adding missing assignment of tuntap_options.dhcp_options. Fixes https://github.com/OpenVPN/openvpn/issues/447 Change-Id: I24f43ad319bd1ca530fe17442d02a97412eb75c7 Signed-off-by: Lev Stipakov --- M src/openvpn/options.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/23/423/1 diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 631ac73..e793a96 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -8014,6 +8014,9 @@ if (streq(p[1], "search-domains") && p[2]) { dns_domain_list_append(&options->dns_options.search_domains, &p[2], &options->dns_options.gc); +#ifdef _WIN32 + options->tuntap_options.dhcp_options |= DHCP_OPTIONS_DHCP_REQUIRED; +#endif } else if (streq(p[1], "server") && p[2] && p[3] && p[4]) { @@ -8090,6 +8093,9 @@ msg(msglevel, "--dns server %ld: unknown option type '%s' or missing or unknown parameter", priority, p[3]); goto err; } +#ifdef _WIN32 + options->tuntap_options.dhcp_options |= DHCP_OPTIONS_DHCP_OPTIONAL; +#endif } else {