From c77af4be6f7e63f5e910bad9e40562685eafaf4f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 18 Oct 2022 12:19:35 +1100 Subject: [PATCH] Support starting and stopping IPv6 only servers Look for $testdir/$server/named.ipv6-only and use fd92:7065:b8e:ffff::$n instead of 10.53.0.$n to communicate with the server. (cherry picked from commit a35c34e10f69588ba12052b0f0c978514810a2a1) --- bin/tests/system/start.pl | 7 ++++++- bin/tests/system/stop.pl | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/tests/system/start.pl b/bin/tests/system/start.pl index 2b93f7476a..b3f4dcee8b 100755 --- a/bin/tests/system/start.pl +++ b/bin/tests/system/start.pl @@ -426,8 +426,13 @@ sub verify_ns_server { $tcp = ""; } + my $ip = "10.53.0.$n"; + if (-e "$testdir/$server/named.ipv6-only") { + $ip = "fd92:7065:b8e:ffff::$n"; + } + while (1) { - my $return = system("$DIG $tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noedns -p $port version.bind. chaos txt \@10.53.0.$n > /dev/null"); + my $return = system("$DIG $tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noedns -p $port version.bind. chaos txt \@$ip > /dev/null"); last if ($return == 0); diff --git a/bin/tests/system/stop.pl b/bin/tests/system/stop.pl index bd4423b60b..7a69658c79 100644 --- a/bin/tests/system/stop.pl +++ b/bin/tests/system/stop.pl @@ -182,6 +182,10 @@ sub stop_rndc { } my $ip = "10.53.0.$n"; + if (-e "$testdir/$server/named.ipv6-only") { + $ip = "fd92:7065:b8e:ffff::$n"; + } + my $how = $halt ? "halt" : "stop"; # Ugly, but should work.