mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-22 06:14:02 -07:00
Support "ALL" to indicate that all domain names are resolved using the specified DNS server
This commit is contained in:
parent
f2cb9b36b2
commit
0d096b52fe
1 changed files with 3 additions and 0 deletions
|
@ -335,6 +335,9 @@ void WinDNSHelper::setDNS(uint64_t nwid, const char* domain, const std::vector<I
|
||||||
RegSetKeyValueA(dnsKey, NULL, "GenericDNSServers", REG_SZ, serverValue.data(), serverValue.length());
|
RegSetKeyValueA(dnsKey, NULL, "GenericDNSServers", REG_SZ, serverValue.data(), serverValue.length());
|
||||||
RegSetKeyValueA(dnsKey, NULL, "IPSECCARestriction", REG_SZ, "", 0);
|
RegSetKeyValueA(dnsKey, NULL, "IPSECCARestriction", REG_SZ, "", 0);
|
||||||
std::string d = "." + std::string(domain);
|
std::string d = "." + std::string(domain);
|
||||||
|
if (d == ".ALL") {
|
||||||
|
d = ".";
|
||||||
|
}
|
||||||
RegSetKeyValueA(dnsKey, NULL, "Name", REG_MULTI_SZ, d.data(), d.length());
|
RegSetKeyValueA(dnsKey, NULL, "Name", REG_MULTI_SZ, d.data(), d.length());
|
||||||
DWORD version = 2;
|
DWORD version = 2;
|
||||||
RegSetKeyValueA(dnsKey, NULL, "Version", REG_DWORD, &version, sizeof(DWORD));
|
RegSetKeyValueA(dnsKey, NULL, "Version", REG_DWORD, &version, sizeof(DWORD));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue