mirror of
https://github.com/coredns/coredns.git
synced 2026-10-09 12:05:22 -04:00
plugin/forward: Treat forward upstream hostnames as absolute FQDNs to avoid search-domain resolution. (#8563)
This commit is contained in:
@@ -195,9 +195,11 @@ func lookupHost(hostname string, resolvers []string) ([]string, error) {
|
||||
return dnsLookup(hostname, resolvers)
|
||||
}
|
||||
|
||||
var netLookupHost = net.LookupHost
|
||||
|
||||
// systemLookup resolves using the system resolver (/etc/resolv.conf).
|
||||
func systemLookup(hostname string) ([]string, error) {
|
||||
ips, err := net.LookupHost(hostname)
|
||||
ips, err := netLookupHost(dns.Fqdn(hostname))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user