all: preserve search domains settings

So bare hostname will be resolved as expected when ctrld is running.
This commit is contained in:
Cuong Manh Le
2025-05-15 17:00:59 +07:00
committed by Cuong Manh Le
parent 00e9d2bdd3
commit 62f73bcaa2
9 changed files with 99 additions and 8 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ import (
// currentNameserversFromResolvconf returns the current nameservers set from /etc/resolv.conf file.
func currentNameserversFromResolvconf() []string {
return resolvconffile.NameServers("")
return resolvconffile.NameServers()
}
// dnsFromResolvConf reads usable nameservers from /etc/resolv.conf file.
@@ -34,7 +34,7 @@ func dnsFromResolvConf() []string {
time.Sleep(retryInterval)
}
nss := resolvconffile.NameServers("")
nss := resolvconffile.NameServers()
var localDNS []string
seen := make(map[string]bool)