-
Notifications
You must be signed in to change notification settings - Fork 451
Description
This is similar to or even the same as #242, but redirect_dns is false in my case.
The server pushes search domains. Probably for compatibility reasons with some clients, it pushes it as both DOMAIN and DOMAIN-SEARCH:
[dhcp-option] [DOMAIN] [int.example.com]
[dhcp-option] [DOMAIN-SEARCH] [int.example.com]
On MacOS, split-DNS is enabled, so
openvpn3/openvpn/client/dns.hpp
Line 267 in 3e3cd51
| server.domains.push_back({domain}); |
server.domains (and not server.search_domains).openvpn3/openvpn/tun/mac/macdns.hpp
Line 223 in 3e3cd51
| CF::dict_set_obj(info->ovpn.mod, "SupplementalMatchDomains", config.resolve_domains()); |
SupplementalMatchDomains but the next line excludes them from being search domains via SupplementalMatchDomainsNoSearch=1.
openvpn3/openvpn/tun/mac/macdns.hpp
Line 229 in 3e3cd51
| if (CF::array_len(config.search_domains)) |
When I comment out the code that sets SupplementalMatchDomainsNoSearch, the search domain is added as expected, and I can resolve names without having to type the FQDN. Alternatively, moving
openvpn3/openvpn/client/dns.hpp
Line 271 in 3e3cd51
| search_domains.push_back({domain}); |
else block, so it always adds the domain to the search list, achieves the desired effect.
Could you please review if the current behavior is expected? It means that MacOS users will not have the search domains set up, at all. There are many threads on various forums on the web where people face this problem. Tunnelblick, on the other hand, supports this.