Skip to content

Commit a8d3238

Browse files
committed
win: don't (always) set DNS with the adapter
Reverts the changes done in commit e6e7b91. Turns out this is actually not needed for search domains to work. That is what recent tests confirm, even though tests back then told a different story. Not having the DNS set has the advantage that no search domains are leaked to the VPN DNS provider when in split mode. Only configured domains will be handled by the NRPT rules, the others go a different way. Jira: OVPN3-1444 Signed-off-by: Heiko Hund <heiko@openvpn.net>
1 parent 5296dc2 commit a8d3238

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

openvpn/tun/win/client/tunsetup.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,12 @@ class Setup : public SetupBase
723723
create.add(new NRPT::ActionCreate(pid, split_domains, addresses, wide_search_domains, dnssec));
724724
destroy.add(new NRPT::ActionDelete(pid));
725725
}
726-
727-
// Set pushed DNS servers with the adapter
728-
set_adapter_dns(create, destroy, tap_index_name, addresses, pull);
726+
else if (allow_local_dns_resolvers && pull.block_outside_dns)
727+
{
728+
// Set pushed DNS servers with the adapter. In case the local resolver
729+
// doesn't work the VPN DNS resolvers will serve as a fallback
730+
set_adapter_dns(create, destroy, tap_index_name, addresses, pull);
731+
}
729732

730733
create.add(new DNS::ActionCreate(tap.name, search_domains));
731734
destroy.add(new DNS::ActionDelete(tap.name, search_domains));

0 commit comments

Comments
 (0)