]> 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>
Sat, 26 Jan 2019 00:15:35 +0000 (16:15 -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 4605e46e3a7e1f47f104b7b6e24b064bda681b29..21a0a8249d0d1925fae3a307d756b2424bfa1681 100644 (file)
@@ -21,4 +21,13 @@ options {
        notify 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 05a374b78f60bca7d9c94206d4f3a58ac2e03dd1..2cf36f26865edcef894ca1b4f0dd95248897afd1 100644 (file)
@@ -21,6 +21,15 @@ options {
        notify no;
 };
 
+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 4ed7841ae607fcf5f45d92914f04474809a57f19..c4db60fd6f695b1e8bf541c43cdc2e7749e37cde 100644 (file)
@@ -262,7 +262,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
@@ -590,7 +590,7 @@ fi
 
 # 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?"