mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-27 12:52:27 +02:00
all: preserve search domains settings
So bare hostname will be resolved as expected when ctrld is running.
This commit is contained in:
committed by
Cuong Manh Le
parent
00e9d2bdd3
commit
62f73bcaa2
@@ -100,6 +100,10 @@ func setDNS(iface *net.Interface, nameservers []string) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Note that Windows won't modify the current search domains if passing nil to luid.SetDNS function.
|
||||
// searchDomains is still implemented for Windows just in case Windows API changes in future versions.
|
||||
_ = searchDomains
|
||||
|
||||
if len(serversV4) == 0 && len(serversV6) == 0 {
|
||||
return errors.New("invalid DNS nameservers")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user