check / check (push) Failing after 30s
When the resolver walks from the root servers towards a name, a server that answered SERVFAIL, or referred the query back to its own zone, up or sideways, ended the step, so finding a zone's servers gave up on the zone though its other servers would answer. Such a reply is now passed over for the zone's next server, as a timeout or a refusal already was. To tell a referral that leads closer to the name from one that does not, each walk keeps the zone of the servers it is asking. Other error replies, such as FORMERR, are passed over too. The walk that finds a nameserver's address shares the same server loop, so it changes too. Model: opus-5-5
35 lines
1.0 KiB
Go
35 lines
1.0 KiB
Go
package resolver
|
|
|
|
import "errors"
|
|
|
|
// Sentinel errors returned by the resolver.
|
|
var (
|
|
// ErrNoNameservers is returned when no authoritative NS
|
|
// could be discovered for a domain.
|
|
ErrNoNameservers = errors.New(
|
|
"no authoritative nameservers found",
|
|
)
|
|
|
|
// ErrNoNameserverAnswered is returned when every nameserver
|
|
// asked about a name timed out, failed or returned a referral,
|
|
// so whether the name has addresses is unknown.
|
|
ErrNoNameserverAnswered = errors.New("no nameserver answered")
|
|
|
|
// ErrUnusableReply is returned when a server replied with an
|
|
// error such as SERVFAIL, or with a referral that leads no
|
|
// closer to the name asked about.
|
|
ErrUnusableReply = errors.New(
|
|
"reply is an error or a referral that leads no closer",
|
|
)
|
|
|
|
// ErrCNAMEDepthExceeded is returned when a CNAME chain
|
|
// exceeds MaxCNAMEDepth.
|
|
ErrCNAMEDepthExceeded = errors.New(
|
|
"CNAME chain depth exceeded",
|
|
)
|
|
|
|
// ErrContextCanceled wraps context cancellation for the
|
|
// resolver's iterative queries.
|
|
ErrContextCanceled = errors.New("context canceled")
|
|
)
|