]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Make "rndc zonestatus" output for mirror zones different than for regular slave zones
authorMichał Kępień <michal@isc.org>
Thu, 28 Jun 2018 11:38:39 +0000 (13:38 +0200)
committerMichał Kępień <michal@isc.org>
Thu, 28 Jun 2018 11:38:39 +0000 (13:38 +0200)
Replace "type: slave" with "type: mirror" in "rndc zonestatus" output
for mirror zones in order to enable the user to tell a regular slave
zone and a mirror zone apart.

bin/named/server.c
bin/tests/system/mirror/clean.sh
bin/tests/system/mirror/tests.sh

index 20151d3563d30d186e7f93081faee145de1e2f1a..22b483123e58aa313f681d967a8d6590c78be94c 100644 (file)
@@ -13849,7 +13849,7 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
                type = "master";
                break;
        case dns_zone_slave:
-               type = "slave";
+               type = dns_zone_ismirror(zone) ? "mirror" : "slave";
                break;
        case dns_zone_stub:
                type = "stub";
index 1c98ed6d3cfbf701c82e7f84413ca882fc2d3183..3f4591695873a4ab2cde98c9a7243dfb63ceb059 100644 (file)
@@ -20,3 +20,4 @@ rm -f */jn-*
 rm -f */named.memstats
 rm -f */named.run
 rm -f dig.out.*
+rm -f rndc.out.*
index 797610f0d2fb1127d78e1d3f149f0c1040b71702..c82da3e095a586a0c393f40087834c6d57ee1219 100644 (file)
@@ -354,5 +354,13 @@ grep "initially-unavailable.*sending notifies" ns3/named.run > /dev/null && ret=
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
+n=`expr $n + 1`
+echo_i "checking output of \"rndc zonestatus\" for a mirror zone ($n)"
+ret=0
+$RNDCCMD 10.53.0.3 zonestatus . > rndc.out.ns3.test$n 2>&1
+grep "type: mirror" rndc.out.ns3.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
 echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1