Skip to content

Commit

Permalink
Delegation05: give more detailed diagnostics
Browse files Browse the repository at this point in the history
Delegation05 can generate NO_RESPONSE or UNEXPECTED_RCODE message tags
when a name server doesn’t respond, or responds with an RCODE different
from NOERROR.

The error messages only state the name server that gave the erroneous
response. They do not give any details on the QNAME or the QTYPE, making
debugging harder. When assisting a connection with troubleshooting a
zone that gave an UNEXPECTED_RCODE message, I’ve had to run the test
with zonemaster-cli and crank the verbosity level right up to DEBUG3
before I could figure out what exactly happened.

Adding the QNAME and QTYPE to the messages being generated in these
cases would help debugging significantly.

I’m perfectly aware that the test case specification itself needs a
complete overhaul, but I believe there should still be some room for
quick and dirty fixes like these.
  • Loading branch information
marc-vanderwal committed Oct 18, 2024
1 parent 45ae3df commit 5e2e6db
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/Zonemaster/Engine/Test/Delegation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ Readonly my %TAG_DESCRIPTIONS => (
},
NO_RESPONSE => sub {
__x # DELEGATION:NO_RESPONSE
"Nameserver {ns} did not respond.", @_;
'Nameserver {ns} did not respond to a query for name {query_name} and type {rrtype}.', @_;
},
NOT_ENOUGH_IPV4_NS_CHILD => sub {
__x # DELEGATION:NOT_ENOUGH_IPV4_NS_CHILD
Expand Down Expand Up @@ -373,7 +373,7 @@ Readonly my %TAG_DESCRIPTIONS => (
},
UNEXPECTED_RCODE => sub {
__x # DELEGATION:UNEXPECTED_RCODE
'Nameserver {ns} answered query with an unexpected rcode ({rcode}).', @_;
'Nameserver {ns} answered query for name {query_name} and type {rrtype} with RCODE {rcode}.', @_;
},

);
Expand Down Expand Up @@ -925,8 +925,9 @@ sub delegation05 {
for my $key ( sort keys %nss ) {
my $ns = $nss{$key};
my $ns_args = {
ns => $ns->string,
rrtype => q{A},
ns => $ns->string,
query_name => $local_nsname,
rrtype => q{A},
};

if ( _ip_disabled_message( \@results, $ns, q{A} ) ) {
Expand Down

0 comments on commit 5e2e6db

Please sign in to comment.