aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLev Stipakov2023-11-15 13:06:23 +0100
committerGert Doering2023-11-15 15:36:23 +0100
commit0acba3cc64064841224f7ea4484e4d9715a42897 (patch)
tree933fad5cee558474d472562de543653c191b4aea /src
parentb90ec6dabfb151dd93ef00081bbc3f55e7d3450f (diff)
downloadopenvpn-0acba3cc64064841224f7ea4484e4d9715a42897.zip
openvpn-0acba3cc64064841224f7ea4484e4d9715a42897.tar.gz
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 <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> (cherry picked from commit 60def50420b050e628f4388e3c9ff771eb70a549)
Diffstat (limited to 'src')
-rw-r--r--src/openvpn/options.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 895ce83..9502982 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -1372,6 +1372,7 @@ tuntap_options_copy_dns(struct options *o)
{
msg(M_WARN, "WARNING: couldn't copy all --dns search-domains to --dhcp-option");
}
+ tt->dhcp_options |= DHCP_OPTIONS_DHCP_REQUIRED;
}
if (dns->servers)
@@ -1409,6 +1410,7 @@ tuntap_options_copy_dns(struct options *o)
{
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) */