]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix rpz test
authorEvan Hunt <each@isc.org>
Thu, 24 Jan 2019 17:42:30 +0000 (09:42 -0800)
committerEvan Hunt <each@isc.org>
Fri, 25 Jan 2019 19:24:11 +0000 (11:24 -0800)
- work around a CR newline problem
- use rndc to stop servers

bin/tests/system/rpz/ns1/named.conf.in
bin/tests/system/rpz/ns4/named.conf.in
bin/tests/system/rpz/tests.sh

index 405a73aeeb6a7aa51f7ccc73dff5d472c4458523..59528f88193dca72ed988354747b793e9bebec4b 100644 (file)
@@ -22,4 +22,13 @@ options {
        minimal-responses no;
 };
 
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
+
+controls {
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
+
 zone "." {type master; file "root.db";};
index 04d6d188fd0367ab0b574b471542bbbf689597c5..6189b627fb908b965a7287126dc5dbdad202ea38 100644 (file)
@@ -24,6 +24,15 @@ options {
        dnssec-validation yes;
 };
 
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
+
+controls {
+       inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
+
 include "../trusted.conf";
 zone "." { type hint; file "hints"; };
 
index 84537e472def89e7836fcafe50285db670d2469c..04576ad1f5104f1fd179a5f413f409e41aec343a 100644 (file)
@@ -358,7 +358,7 @@ addr () {
     digcmd $2 >$DIGNM
     #ckalive "$2" "server crashed by 'dig $2'" || return 1
     ADDR_ESC=`echo "$ADDR" | sed -e 's/\./\\\\./g'`
-    ADDR_TTL=`sed -n -e "s/^[-.a-z0-9]\{1,\}[   ]*\([0-9]*\)   IN      AA*     ${ADDR_ESC}\$/\1/p" $DIGNM`
+    ADDR_TTL=`tr -d '\r' < $DIGNM | sed -n -e "s/^[-.a-z0-9]\{1,\}[     ]*\([0-9]*\)   IN      AA*     ${ADDR_ESC}\$/\1/p"`
     if test -z "$ADDR_TTL"; then
        setret "'dig $2' wrong; no address $ADDR record in $DIGNM"
        return 1
@@ -430,7 +430,7 @@ for mode in native dnsrps; do
       continue
     fi
     echo_i "attempting to configure servers with DNSRPS..."
-    $PERL $SYSTEMTESTTOP/stop.pl rpz
+    $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} rpz
     $SHELL ./setup.sh -N -D $DEBUG
     for server in ns*; do
       resetstats $server
@@ -741,7 +741,7 @@ EOF
 
   # restart the main test RPZ server to see if that creates a core file
   if test -z "$HAVE_CORE"; then
-    $PERL $SYSTEMTESTTOP/stop.pl rpz ns3
+    $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} rpz ns3
     restart 3
     HAVE_CORE=`find ns* -name '*core*' -print`
     test -z "$HAVE_CORE" || setret "found $HAVE_CORE; memory leak?"