From fafc2f543322edded2d50e0f8fde4f8e9baa9fe8 Mon Sep 17 00:00:00 2001 From: Marc van der Wal Date: Wed, 7 Dec 2022 09:18:14 +0100 Subject: [PATCH] Zone01: Fix test for localhost IPs 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. --- lib/Zonemaster/Engine/Test/Zone.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Zonemaster/Engine/Test/Zone.pm b/lib/Zonemaster/Engine/Test/Zone.pm index 44d55dd62..2f45072fc 100644 --- a/lib/Zonemaster/Engine/Test/Zone.pm +++ b/lib/Zonemaster/Engine/Test/Zone.pm @@ -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{