Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TCP for weave dns. #1038

Merged
merged 1 commit into from
Feb 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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