From: "stipa (Code Review)" Date: Thu, 31 Jul 2025 09:16:17 +0000 References: Reply-To: lstipakov@...277..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <6942f09a1207c0a0a1ae6c30bca4439ac2d8c456-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="lOP/FvRmKT4="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Fix --dns options for TAP adapter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --lOP/FvRmKT4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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/+/1120?usp=3Demail to review the following change. Change subject: Fix --dns options for TAP adapter ...................................................................... Fix --dns options for TAP adapter Commit 2dfc4f ("dns: deal with --dhcp-options when --dns is active") has accidentally removed setting of the DHCP_OPTIONS_DHCP_OPTIONAL flag when copying --dns options. This flag is required to apply options via DHCP string, which we do for TAP adapter. As a result, --dns options stopped working for TAP. Fix by setting this flag when copying --dns options to tuntap_options. Change-Id: Id95cd14095a03afb3140a03ae96e9f5679e4fe89 Signed-off-by: Lev Stipakov --- M src/openvpn/options.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/20/1120/1 diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 53be6f5..fde3e73 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3579,6 +3579,9 @@ { msg(M_WARN, "WARNING: couldn't copy all --dns server addre= sses to TUN/TAP"); } +#if defined(_WIN32) + tt->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL; +#endif return; } } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1120?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: Id95cd14095a03afb3140a03ae96e9f5679e4fe89 Gerrit-Change-Number: 1120 Gerrit-PatchSet: 1 Gerrit-Owner: stipa Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --lOP/FvRmKT4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

stipa would like plaisthos and flichtenheld to review t= his change.

V= iew Change

Fix --dns options for TAP adapter

Commit

2= dfc4f ("dns: deal with --dhcp-options when --dns is active")
<= br>has accidentally removed setting of the DHCP_OPTIONS_DHCP_OPTIONAL
fl= ag when copying --dns options. This flag is required to apply options
vi= a DHCP string, which we do for TAP adapter. As a result, --dns options
s= topped working for TAP.

Fix by setting this flag when copying --dns = options to tuntap_options.

Change-Id: Id95cd14095a03afb3140a03ae96e9= f5679e4fe89
Signed-off-by: Lev Stipakov <lev@...515...>
---
= M src/openvpn/options.c
1 file changed, 3 insertions(+), 0 deletions(-)<= br>
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/20/1=
120/1
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 53be6f5..fde3e73 100644
--- a/src/openv= pn/options.c
+++ b/src/openvpn/options.c
@@= -3579,6 +3579,9 @@
{
= msg(M_WARN, "WARNING: couldn't copy all --dns server addr= esses to TUN/TAP");
}
+#if defined(_WIN32)
+ tt->dhcp_options |=3D DH= CP_OPTIONS_DHCP_OPTIONAL;
+#endif
return;
= }
}

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

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id95cd14095a03afb3140a03ae96= e9f5679e4fe89
Gerrit-Change-Number: 1120
Gerrit-PatchSet: 1
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-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--lOP/FvRmKT4=--