Improve DNS output: distinguish NS resolution failures from domain errors (#20)
CI / test (push) Failing after 2m19s

This commit was merged in pull request #20.
This commit is contained in:
2026-06-08 05:59:33 +00:00
parent d6063eb636
commit 25e6039bde
7 changed files with 32 additions and 6 deletions
+8 -1
View File
@@ -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