From: "stipa (Code Review)"
Date: Mon, 13 Nov 2023 16:01:32 +0000
References:
Reply-To: lstipakov@...277..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, frank@...2641...
Message-ID:
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="3yuJsjUmiWA="; 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: plaisthos , flichtenheld
Cc: openvpn-devel
--3yuJsjUmiWA=
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/+/427?usp=3Demail
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, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/27/427/1
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 t=
o --dhcp-option");
}
+
+ tt->dhcp_options |=3D 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 |=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: 1
Gerrit-Owner: stipa
Gerrit-Reviewer: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-Attention: plaisthos
Gerrit-Attention: flichtenheld
Gerrit-MessageType: newchange
--3yuJsjUmiWA=
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.
Vi=
ew Change
Make --dns options apply for tap-windows6 driver
When =
tap-windows6 driver is used, both --dhcp-option and
--dns options are ap=
plied with DHCP. When processing --dns options,
we don't set "t=
untap_options.dhcp_options" member, which is required
for DHCP stri=
ng 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_opti=
ons.
Fixes https://github.com/OpenVPN/openvpn/issues/447
Chan=
ge-Id: I24f43ad319bd1ca530fe17442d02a97412eb75c7
Signed-off-by: Lev Stip=
akov <lev@...515...>
---
M src/openvpn/options.c
1 file chan=
ged, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvp=
n.net:29418/openvpn refs/changes/27/427/1
diff --git a/src/openvpn/=
options.c b/src/openvpn/options.c
index b88fea9..abd2e0c 10=
0644
--- 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 |=
=3D DHCP_OPTIONS_DHCP_REQUIRED;
}
if (dns->servers)
@@ -1401,6 +1403,7 =
@@
{
msg(M_WARN, &quo=
t;WARNING: couldn't copy all --dns server addresses to --dhcp-option&qu=
ot;);
}
+ tt->dhcp_options |=3D DHCP_OPTIONS_DHCP_OPTIONAL;=
span>
}
}
#else /* if defin=
ed(_WIN32) || defined(TARGET_ANDROID) */
<=
p>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: 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
--3yuJsjUmiWA=--