From: "cron2 (Code Review)" Date: Wed, 15 Nov 2023 14:45:30 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277... Message-ID: <627afdb781df4b1009cb63332b0d297ddcbc3e81-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="696HFUE0lLw="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Make --dns options apply for tap-windows6 driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: stipa , plaisthos , flichtenheld Cc: openvpn-devel --696HFUE0lLw= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= stipa. ( http://gerrit.openvpn.net/c/openvpn/+/427?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by flichtenheld 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. Github: fixes OpenVPN/openvpn#447 Change-Id: I24f43ad319bd1ca530fe17442d02a97412eb75c7 Signed-off-by: Lev Stipakov Acked-by: Frank Lichtenheld Message-Id: <20231115120623.6442-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27= 402.html Signed-off-by: Gert Doering --- M src/openvpn/options.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/27/427/2 diff --git a/src/openvpn/options.c b/src/openvpn/options.c index b88fea9..bd731ff 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -1364,6 +1364,7 @@ { msg(M_WARN, "WARNING: couldn't copy all --dns search-domains t= o --dhcp-option"); } + tt->dhcp_options |=3D DHCP_OPTIONS_DHCP_REQUIRED; } if (dns->servers) @@ -1401,6 +1402,7 @@ { msg(M_WARN, "WARNING: couldn't copy all --dns server addresses= to --dhcp-option"); } + tt->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL; } } #else /* if defined(_WIN32) || defined(TARGET_ANDROID) */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/427?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I24f43ad319bd1ca530fe17442d02a97412eb75c7 Gerrit-Change-Number: 427 Gerrit-PatchSet: 2 Gerrit-Owner: stipa Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --696HFUE0lLw= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #2 to the change originally cr= eated by stipa.

View Change

The following approvals got outdated and= were removed: Code-Review+2 by flichtenheld

Make --dns options apply for tap-windows6 dri=
ver

When tap-windows6 driver is used, both --dhcp-option and
--dn= s options are applied with DHCP. When processing --dns options,
we don&#= 39;t set "tuntap_options.dhcp_options" member, which is required<= br>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_o= ptions.dhcp_options.

Github: fixes OpenVPN/openvpn#447

Change= -Id: I24f43ad319bd1ca530fe17442d02a97412eb75c7
Signed-off-by: Lev Stipak= ov <lev@...515...>
Acked-by: Frank Lichtenheld <frank@...2723...= .>
Message-Id: <20231115120623.6442-1-gert@...1296...>
URL: = https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27402.h= tml
Signed-off-by: Gert Doering <gert@...1296...>
---
M src/= openvpn/options.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/27/427/2
diff --git a/src/openvpn/options.c b/src/openvpn/options.cindex b88fea9..bd731ff 100644
--- a/src/openvpn/opti= ons.c
+++ b/src/openvpn/options.c
@@ -1364,= 6 +1364,7 @@
{
msg(M_= WARN, "WARNING: couldn't copy all --dns search-domains to --dhcp-o= ption");
}
+ tt->dhcp_options |=3D DHCP_OPTIONS_DHCP_REQ= UIRED;
}

if (dn= s->servers)
@@ -1401,6 +1402,7 @@
= {
msg(M_WARN, "WARNING: couldn't c= opy all --dns server addresses to --dhcp-option");
= }
+ tt-&= gt;dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL;
}
}
#else /* if defined(_WIN32) || defined(TAR= GET_ANDROID) */

To view, visit change 427. = To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I24f43ad319bd1ca530fe17442d0= 2a97412eb75c7
Gerrit-Change-Number: 427
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <lstipakov@...277...>= ;
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--696HFUE0lLw=--