| Message ID | 20231115120623.6442-1-gert@greenie.muc.de |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:7300:3c06:b0:f2:62eb:61c1 with SMTP id e6csp2865748dys;
Wed, 15 Nov 2023 04:07:00 -0800 (PST)
X-Google-Smtp-Source:
AGHT+IF0D+MSjPPl7+CCLcQk7We/AdpOTD1owNCytXMGClohvUe1Rcz5aqrAiiGyQbtL+EC8Cke+
X-Received: by 2002:a05:6a20:7f8c:b0:186:fdb:5cd with SMTP id
d12-20020a056a207f8c00b001860fdb05cdmr2116204pzj.2.1700050020555;
Wed, 15 Nov 2023 04:07:00 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1700050020; cv=none;
d=google.com; s=arc-20160816;
b=lgVKPqOyA98K3o3DskyCbV9msx8yY8g4stq6CHdurKs98DSdGJLEYFtpcWOA6T4jwE
5J5+jXpgSGOYY2Dk7xhERzIjtfF6dFSChdh6GL1XxzJC/3yU9fkhrFk9qWMh2SU87kF5
f6gK+TajLiU5+u+wY0CkPuAXHufuFBnlB2boJ67dFsBvuZP7jyqGkZ2/1k5FKHnAZCAn
OrES5I9ibTcjuM5fODnAqJTAP1kbktRj+iJEah1PR13bvIK90E8Cqi/BGtvpu8Tqlkgo
pdYzCiDN4/yDzY27UxLSUk7orfpTalCDx7M5sA2RTnP4A5tbyt6Gnd0MCou+3/ID5g7C
vY0A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=errors-to:content-transfer-encoding:list-subscribe:list-help
:list-post:list-archive:list-unsubscribe:list-id:precedence:subject
:mime-version:references:in-reply-to:message-id:date:to:from
:dkim-signature:dkim-signature;
bh=mFnSLERuKjY3kjAXoVfxYYfEjnYIg0ucvKXBt9XLuJM=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=GTeG4JycS7QWMiTrjBXsvcvS/Do8IFd038q9WBU93oTVORKPAqoE7K1z/OcvgW36i8
eW6B0RQLhnZROkLPd3x8YNWlq5xL/+PHxYt5Fjwuf1EkPr7AekLS8Y1jbX16nAnl8EOR
R8QA1VFFuz41Oo6Ga+VuKb08bdY6N3XE+6+a1272tqNhSaVIaco9Q0yRksgSV2nIS8Kv
bTaBU3dkBP8sk/8AQVtDKUn2tO0gqHUutTlPaGSUzrLCdN+ldVWHBa6b+5xm0TFV0p6C
cIdOPV8Q8NuTXDaZj8VaABWOS7Rnzb5bgz2DJWjI1ZBeMhphdN94nfQz80/rfNkmdLkF
MLEw==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=ZNDY21bV;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=TuFjQ7kn;
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=muc.de
Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7])
by mx.google.com with ESMTPS id
t12-20020a65554c000000b005859a7d38f9si9839212pgr.703.2023.11.15.04.07.00
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Wed, 15 Nov 2023 04:07:00 -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=ZNDY21bV;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b=TuFjQ7kn;
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=muc.de
Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com)
by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1r3EfC-0002dP-LQ;
Wed, 15 Nov 2023 12:06:35 +0000
Received: from [172.30.20.202] (helo=mx.sourceforge.net)
by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95)
(envelope-from <gert@blue.greenie.muc.de>) id 1r3EfA-0002dI-Qh
for openvpn-devel@lists.sourceforge.net;
Wed, 15 Nov 2023 12:06:33 +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:References:
In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=VFtmeaYZMLnisTjBambaC/8UeNzd0IazgtCcPZVdjpg=; b=ZNDY21bVmpCdIxl5oyfPGeC0Xk
IzxhwV/tEDE3QPj7xdb8m8xI8vJ5twN9SKlBzDZC2lzCyF7g0KC/qhzcZ3xQGVRdhqQ8sLw99UGGJ
17SdTn4BOAVHGc1vYZYkzcJB9BwHS/rSyunzFbTqYaySmu+yoCAKCkrXRDo6ioFPjgIY=;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x
;
h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:
Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:
Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
List-Post:List-Owner:List-Archive;
bh=VFtmeaYZMLnisTjBambaC/8UeNzd0IazgtCcPZVdjpg=; b=TuFjQ7kno2eAna1cPs6oNIVGW8
RWldz/5wDUBHY1okot5vtVGHXGvg7NmUyPm2wZ4LMG1Lx5gGP0OODcH1JnqJpYiSjyt9NhB8wsBzk
o1QZhZE9CC0Fsf6DV4bFqFGQYfzphiVhSRbnIZS8CqJs/hQbPKUZMyK0ZzwH9bfjRTOQ=;
Received: from dhcp-174.greenie.muc.de ([193.149.48.174]
helo=blue.greenie.muc.de)
by sfi-mx-1.v28.lw.sourceforge.com with esmtps
(TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95)
id 1r3Ef8-006QqD-Rc for openvpn-devel@lists.sourceforge.net;
Wed, 15 Nov 2023 12:06:33 +0000
Received: from blue.greenie.muc.de (localhost [127.0.0.1])
by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 3AFC6Olb006503
for <openvpn-devel@lists.sourceforge.net>; Wed, 15 Nov 2023 13:06:24 +0100
Received: (from gert@localhost)
by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 3AFC6OPM006502
for openvpn-devel@lists.sourceforge.net; Wed, 15 Nov 2023 13:06:24 +0100
From: Gert Doering <gert@greenie.muc.de>
To: openvpn-devel@lists.sourceforge.net
Date: Wed, 15 Nov 2023 13:06:23 +0100
Message-ID: <20231115120623.6442-1-gert@greenie.muc.de>
X-Mailer: git-send-email 2.41.0
In-Reply-To:
<gerrit.1699891289000.I24f43ad319bd1ca530fe17442d02a97412eb75c7@gerrit.openvpn.net>
References:
<gerrit.1699891289000.I24f43ad319bd1ca530fe17442d02a97412eb75c7@gerrit.openvpn.net>
MIME-Version: 1.0
X-Spam-Score: -0.0 (/)
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: From: Lev Stipakov <lev@openvpn.net> 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 DH [...]
Content analysis details: (-0.0 points, 6.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.0 SPF_PASS SPF: sender matches SPF record
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
-0.0 T_SCC_BODY_TEXT_LINE No description available.
X-Headers-End: 1r3Ef8-006QqD-Rc
Subject: [Openvpn-devel] [PATCH v1] 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: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
X-GMAIL-THRID: =?utf-8?q?1782631650614608200?=
X-GMAIL-MSGID: =?utf-8?q?1782631650614608200?=
|
| Series |
[Openvpn-devel,v1] Make --dns options apply for tap-windows6 driver
|
|
Commit Message
Gert Doering
Nov. 15, 2023, 12:06 p.m. UTC
From: Lev Stipakov <lev@openvpn.net> 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 <lev@openvpn.net> Acked-by: Frank Lichtenheld <frank@lichtenheld.com> --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/427 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld <frank@lichtenheld.com>
Comments
Haven't tested this for real, but it looks very reasonable. Just inject
the proper flag on "--dns", the backend data structures are already
filled, we just didn't know that we should use them.
Sanity tested via GHA build.
Your patch has been applied to the master and release/2.6 branch
(bugfix, --dns functionality not working right on Windows).
commit 60def50420b050e628f4388e3c9ff771eb70a549 (master)
commit 0acba3cc64064841224f7ea4484e4d9715a42897 (HEAD -> release/2.6)
Author: Lev Stipakov
Date: Wed Nov 15 13:06:23 2023 +0100
Make --dns options apply for tap-windows6 driver
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20231115120623.6442-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27402.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/src/openvpn/options.c b/src/openvpn/options.c index b88fea9..abd2e0c 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -1364,6 +1364,8 @@ { msg(M_WARN, "WARNING: couldn't copy all --dns search-domains to --dhcp-option"); } + + tt->dhcp_options |= DHCP_OPTIONS_DHCP_REQUIRED; } if (dns->servers) @@ -1401,6 +1403,7 @@ { msg(M_WARN, "WARNING: couldn't copy all --dns server addresses to --dhcp-option"); } + tt->dhcp_options |= DHCP_OPTIONS_DHCP_OPTIONAL; } } #else /* if defined(_WIN32) || defined(TARGET_ANDROID) */