Skip to content

Commit

Permalink
Fix array in conditional for DS10_EXPECTED_NSEC_NSEC3_MISSING in DNSS…
Browse files Browse the repository at this point in the history
…EC10

Use a list of queried name servers instead of all name servers, in case any IP protocol is unavailable (or if the IP address has already been processed).
  • Loading branch information
tgreenx committed Dec 11, 2024
1 parent 564d606 commit 0e5c896
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Zonemaster/Engine/Test/DNSSEC.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3150,6 +3150,7 @@ sub dnssec10 {
@{ Zonemaster::Engine::TestMethodsV2->get_zone_ns_names_and_ips( $zone ), Zonemaster::Engine::TestMethodsV2->get_del_ns_names_and_ips( $zone ) }
: @{ Zonemaster::Engine::TestMethodsV2->get_del_ns_names_and_ips( $zone ) }
: ();
my @queried_nss;

my %ip_already_processed;
my $testing_time = time;
Expand All @@ -3162,6 +3163,8 @@ sub dnssec10 {
next;
}

push @queried_nss, $ns;

my $dnskey_p = $ns->query( $zone->name, $type_dnskey, { dnssec => 1 } );

if ( not $dnskey_p or $dnskey_p->rcode ne q{NOERROR} or not $dnskey_p->aa ) {
Expand Down Expand Up @@ -3786,7 +3789,7 @@ sub dnssec10 {
);
}

$lc = List::Compare->new( [ @nss ], [ @without_dnskey, @nsec_in_answer, @nsec3param_nsec_nodata, @nsec3param_in_answer, @nsec_nsec3_nodata ] );
$lc = List::Compare->new( [ @queried_nss ], [ @without_dnskey, @nsec_in_answer, @nsec3param_nsec_nodata, @nsec3param_in_answer, @nsec_nsec3_nodata ] );
@first = $lc->get_unique;

if ( @first ) {
Expand Down

0 comments on commit 0e5c896

Please sign in to comment.