Improve DNS output: distinguish NS resolution failures from domain errors (#20)
CI / test (push) Failing after 2m19s
CI / test (push) Failing after 2m19s
This commit was merged in pull request #20.
This commit is contained in:
@@ -20,6 +20,11 @@ const (
|
||||
RespNOTIMPL
|
||||
RespCNAMELoop
|
||||
RespError
|
||||
// RespNSResolutionFailed indicates that the traversal could not resolve the
|
||||
// IP address of an in-bailiwick nameserver. The domain may still be
|
||||
// reachable in practice (e.g. via glue records held by the registry), but
|
||||
// the iterative traversal could not complete that path.
|
||||
RespNSResolutionFailed
|
||||
)
|
||||
|
||||
func (rt ResponseType) String() string {
|
||||
@@ -44,6 +49,8 @@ func (rt ResponseType) String() string {
|
||||
return "cname_loop"
|
||||
case RespError:
|
||||
return "error"
|
||||
case RespNSResolutionFailed:
|
||||
return "ns_error"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
@@ -231,7 +238,7 @@ func (r *Response) resolveGlue(child *Referral) {
|
||||
|
||||
func (r *Response) IsTerminal() bool {
|
||||
switch r.Type {
|
||||
case RespAnswer, RespNODATA, RespNXDOMAIN, RespSERVFAIL, RespREFUSED, RespNOTIMPL, RespCNAMELoop, RespError:
|
||||
case RespAnswer, RespNODATA, RespNXDOMAIN, RespSERVFAIL, RespREFUSED, RespNOTIMPL, RespCNAMELoop, RespError, RespNSResolutionFailed:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user