Skip to content

Commit

Permalink
Zone01: Fix test for localhost IPs
Browse files Browse the repository at this point in the history
A small programming oversight meant that in Zone01, the message tag
Z01_MNAME_HAS_LOCALHOST_ADDR would only be output if the SOA MNAME as an
A record of 127.0.0.1, but not if it has a AAAA record of ::1.
  • Loading branch information
marc-vanderwal committed Dec 7, 2022
1 parent fe20c17 commit fafc2f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Zonemaster/Engine/Test/Zone.pm
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ sub zone01 {

if ( $found_ip ){
foreach my $ip ( keys %{ $mname_ns{$mname} } ){
if ( $ip eq ( '127.0.0.1' or '::1' ) ){
if ( $ip eq '127.0.0.1' or $ip eq '::1' ){
push @results, info( Z01_MNAME_HAS_LOCALHOST_ADDR => { nsname => $mname, ns_ip => $ip } );
}
else{
Expand Down

0 comments on commit fafc2f5

Please sign in to comment.