From 592bf3fb4355cf3fae9cefc4dbb3fc0de75c12da Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Thu, 25 Feb 2016 15:39:20 +0000 Subject: [PATCH] Use TCP for weave dns. --- probe/appclient/resolver.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 }