diff --git a/probe/appclient/resolver.go b/probe/appclient/resolver.go index d9d7f07c02..265428384b 100644 --- a/probe/appclient/resolver.go +++ b/probe/appclient/resolver.go @@ -57,10 +57,13 @@ func NewResolver(targets []string, lookup LookupIP, setters ...setter) Resolver // LookupUsing produces a LookupIP function for the given DNS server. func LookupUsing(dnsServer string) func(host string) (ips []net.IP, err error) { + client := dns.Client{ + Net: "tcp", + } return func(host string) (ips []net.IP, err error) { m := &dns.Msg{} m.SetQuestion(dns.Fqdn(host), dns.TypeA) - in, err := dns.Exchange(m, dnsServer) + in, _, err := client.Exchange(m, dnsServer) if err != nil { return nil, err }