Skip to content

CONNECTIVITY04 - IP prefix diversity requirement  #1174

Description

@d4nys3k

Hello,
current implementation of CONNECTIVITY04 has strict requirement not to have two nameservers within single subnet. The idea of diversity, in my opinion, is primarily about having at least one nameserver in another network and there is nothing wrong with having two nameservers in single network, as long as I have at least one in another network (so, you can have two nameservers in single subnet and third in different network, for example). if it doesn't matter that the zone has only two servers, if each is in a different subnet, 2+1 configuration should not be a problem.

I tried to modify lib/Zonemaster/Engine/Test/Connectivity.pm in this way by patch below to not issue warning in such case. I'm using version 4.7.0 of Engine at this time. It does what I expect based on the thoughts above.

Could you please consider modifying your CONNECTIVITY04 test approach?

--- Connectivity.pm.orig        2023-06-01 10:39:55.000000000 +0200
+++ Connectivity.pm     2023-06-30 23:44:41.247946421 +0200
@@ -615,2 +615,3 @@
     my %prefixes;
+    my %nscount=(4=>0,6=>0);
 
@@ -645,2 +646,3 @@
                 if ( $prefix->version == 4 ) {
+                    $nscount{4}++;
                     $prefix_str = $prefix->prefix;
@@ -648,2 +650,3 @@
                 elsif ( $prefix->version == 6 ) {
+                    $nscount{6}++;
                     $prefix_str = $prefix->short . '/' . $prefix->prefixlen;
@@ -671,6 +674,6 @@
         foreach my $prefix ( keys %{ $prefixes{$ip_version} } ) {
-            if ( scalar @{ $prefixes{$ip_version}{$prefix} } == 1 ) {
+            if ( scalar @{ $prefixes{$ip_version}{$prefix} } <= $nscount{$ip_version}-1 ) {
                 push @combined_ns, @{ $prefixes{$ip_version}{$prefix} };
             }
-            elsif ( scalar @{ $prefixes{$ip_version}{$prefix} } >= 2 ) {
+            elsif ( scalar @{ $prefixes{$ip_version}{$prefix} } == $nscount{$ip_version} ) {
                 push @results,

Metadata

Metadata

Labels

A-TestCaseArea: Test case specification or implementation of test caseP-HighPriority: Issue to be solved before otherT-QuestionType: External question.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions