resolver: a nameserver is asked at each of its addresses in turn (closes #285)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
A nameserver's queries went only to the first IPv4 address its name resolves to, so one unreachable address made it fail whenever that address came first in the answer. Each record type is now asked at the addresses one at a time until one gives a usable reply, and the next type is asked first at the address that gave it. A type that fails is logged with the reason at each address, and a nameserver is reported as timed out only when every query timed out; one given no address has failed. The README's DNS Resolution Strategy says which addresses are asked. Model: opus-5-5
This commit was merged in pull request #291.
This commit is contained in:
@@ -96,6 +96,17 @@ func (r *Resolver) QueryServers(
|
||||
return r.queryServers(ctx, servers, zone, name, qtype)
|
||||
}
|
||||
|
||||
// QueryTypes exports queryTypes for testing.
|
||||
func (r *Resolver) QueryTypes(
|
||||
ctx context.Context,
|
||||
nsHostname string,
|
||||
nsIPs []string,
|
||||
hostname string,
|
||||
qtypes []uint16,
|
||||
) (*NameserverResponse, error) {
|
||||
return r.queryTypes(ctx, nsHostname, nsIPs, hostname, qtypes)
|
||||
}
|
||||
|
||||
// QueryEachNS exports queryEachNS for testing.
|
||||
func (r *Resolver) QueryEachNS(
|
||||
ctx context.Context,
|
||||
|
||||
Reference in New Issue
Block a user