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 a35c34e10f)
This commit is contained in:
Mark Andrews 2022-10-18 12:19:35 +11:00
parent 43e714336a
commit c77af4be6f
2 changed files with 10 additions and 1 deletions

View file

@ -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);

View file

@ -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.