Skip to content

Commit

Permalink
Merge pull request #1038 from weaveworks/1013-use-tcp-for-weavedns
Browse files Browse the repository at this point in the history
Use TCP for weave dns.
  • Loading branch information
errordeveloper committed Feb 26, 2016
2 parents 1d17a33 + 592bf3f commit b0d6078
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion probe/appclient/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b0d6078

Please sign in to comment.