]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add qname-minimization off as an option; test fixes
authorWitold Kręcicki <wpk@isc.org>
Tue, 12 Jun 2018 08:20:43 +0000 (10:20 +0200)
committerWitold Kręcicki <wpk@isc.org>
Tue, 12 Jun 2018 08:24:05 +0000 (10:24 +0200)
bin/named/server.c
bin/tests/system/qmin/ns1/named.conf.in
bin/tests/system/qmin/ns5/named.conf.in
bin/tests/system/qmin/ns6/named.conf.in
bin/tests/system/qmin/ns7/named.conf.in
bin/tests/system/qmin/prereq.sh [new file with mode: 0644]
bin/tests/system/qmin/tests.sh
lib/isccfg/namedconf.c
util/copyrights

index ab14623afaa437b6bb735c6dc00b1d5c2812ece1..c8ff38e4c980952847d349c5fe059d5b1448ad8f 100644 (file)
@@ -4651,7 +4651,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
        } else if (!strcmp(qminmode, "relaxed")) {
                view->qminimization = ISC_TRUE;
                view->qmin_strict = ISC_FALSE;
-       } else {
+       } else { /* "disabled" or "off" */
                view->qminimization = ISC_FALSE;
                view->qmin_strict = ISC_FALSE;
        }
index 7188e3c37291f87a9e2d3ea21b5a662fbe96998a..d1ab47dbdb63e9e66ba8a258ccd339c7f7650580 100644 (file)
@@ -21,6 +21,7 @@ options {
        listen-on-v6 { none; };
        recursion no;
        notify yes;
+       dnssec-validation no;
 };
 
 zone "." {
index 4d045a58ad8be5376f3a6f3a1539ea37649bad90..b4163ab0660998e3c67f66307263f0fee4467e12 100644 (file)
@@ -23,6 +23,7 @@ options {
        qname-minimization disabled;
        querylog yes;
        resolver-query-timeout 30;
+       dnssec-validation no;
 };
 
 key rndc_key {
index 661549b40709a2b6a70c6d2104b31ee84ae8bda1..c5fe9adc6043623671615fd6921a6fd834f12078 100644 (file)
@@ -23,6 +23,7 @@ options {
        qname-minimization strict;
        querylog yes;
        resolver-query-timeout 30;
+       dnssec-validation no;
 };
 
 key rndc_key {
index 48def89b2587bacfd39c06f59e972bfc8f990e0a..84472ca92af900923d84202bb01f7d02d7ceddb7 100644 (file)
@@ -23,6 +23,7 @@ options {
        qname-minimization relaxed;
        querylog yes;
        resolver-query-timeout 30;
+       dnssec-validation no;
 };
 
 key rndc_key {
diff --git a/bin/tests/system/qmin/prereq.sh b/bin/tests/system/qmin/prereq.sh
new file mode 100644 (file)
index 0000000..f570c1f
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# See the COPYRIGHT file distributed with this work for additional
+# information regarding copyright ownership.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL ../testcrypto.sh || exit 255
+
+if test -n "$PYTHON"
+then
+    if $PYTHON -c "import dns" 2> /dev/null
+    then
+        :
+    else
+        echo_i "This test requires the dnspython module." >&2
+        exit 1
+    fi
+else
+    echo_i "This test requires Python and the dnspython module." >&2
+    exit 1
+fi
index f0e61cf58a03e7ca2e4fd16dd916599460ec1a93..938cd7bbb1e74f9a3f38386cbe01b2c1f607111d 100755 (executable)
@@ -26,6 +26,7 @@ $RNDCCMD 10.53.0.5 flush
 $DIG $DIGOPTS icky.icky.icky.ptang.zoop.boing.good. @10.53.0.5 > dig.out.test$n
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 grep "icky.icky.icky.ptang.zoop.boing.good. 1  IN A    192.0.2.1" dig.out.test$n > /dev/null || ret=1
+sleep 1
 cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
 A icky.icky.icky.ptang.zoop.boing.good.
 A ns3.good.
@@ -47,6 +48,7 @@ $RNDCCMD 10.53.0.5 flush
 $DIG $DIGOPTS icky.icky.icky.ptang.zoop.boing.bad. @10.53.0.5 > dig.out.test$n
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 grep "icky.icky.icky.ptang.zoop.boing.bad. 1 IN A      192.0.2.1" dig.out.test$n > /dev/null || ret=1
+sleep 1
 cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
 A icky.icky.icky.ptang.zoop.boing.bad.
 A ns3.bad.
@@ -69,6 +71,7 @@ $DIG $DIGOPTS icky.icky.icky.ptang.zoop.boing.slow. @10.53.0.5 > dig.out.test$n
 sleep 5
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 grep "icky.icky.icky.ptang.zoop.boing.slow. 1  IN A    192.0.2.1" dig.out.test$n > /dev/null || ret=1
+sleep 1
 cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
 A icky.icky.icky.ptang.zoop.boing.slow.
 A ns3.slow.
@@ -90,6 +93,7 @@ $RNDCCMD 10.53.0.6 flush
 $DIG $DIGOPTS icky.icky.icky.ptang.zoop.boing.good. @10.53.0.6 > dig.out.test$n
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 grep "icky.icky.icky.ptang.zoop.boing.good. 1  IN A    192.0.2.1" dig.out.test$n > /dev/null || ret=1
+sleep 1
 # Duplicated NS queries are there because we're not creating
 # a separate fetch when doing qname minimization - so two
 # queries running for the same name but different RRTYPE
@@ -129,6 +133,7 @@ $CLEANQL
 $RNDCCMD 10.53.0.6 flush
 $DIG $DIGOPTS icky.icky.icky.ptang.zoop.boing.bad. @10.53.0.6 > dig.out.test$n
 grep "status: NXDOMAIN" dig.out.test$n > /dev/null || ret=1
+sleep 1
 echo "NS boing.bad." | diff ans2/query.log - > /dev/null || ret=1
 for ans in ans2 ans3 ans4; do mv -f $ans/query.log query-$ans-$n.log 2>/dev/null || true; done
 if [ $ret != 0 ]; then echo_i "failed"; fi
@@ -142,6 +147,7 @@ $RNDCCMD 10.53.0.7 flush
 $DIG $DIGOPTS icky.icky.icky.ptang.zoop.boing.bad. @10.53.0.7 > dig.out.test$n
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 grep "icky.icky.icky.ptang.zoop.boing.bad. 1 IN A      192.0.2.1" dig.out.test$n > /dev/null || ret=1
+sleep 1
 cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
 NS boing.bad.
 A icky.icky.icky.ptang.zoop.boing.bad.
@@ -201,6 +207,7 @@ $RNDCCMD 10.53.0.6 flush
 $DIG $DIGOPTS -x 2001:4f8::1 @10.53.0.6 > dig.out.test$n
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 grep "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.f.4.0.1.0.0.2.ip6.arpa. 1 IN PTR nee.com." dig.out.test$n > /dev/null || ret=1
+sleep 1
 cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
 NS 1.0.0.2.ip6.arpa.
 NS 8.f.4.0.1.0.0.2.ip6.arpa.
@@ -221,6 +228,7 @@ $RNDCCMD 10.53.0.6 flush
 $DIG $DIGOPTS many.labels.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.good. @10.53.0.6 > dig.out.test$n
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 grep "many.labels.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.good. 1  IN A 192.0.2.2" dig.out.test$n > /dev/null || ret=1
+sleep 1
 # We skipped after third no-delegation.
 cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
 NS z.good.
@@ -239,6 +247,7 @@ $RNDCCMD 10.53.0.6 flush
 $DIG $DIGOPTS more.icky.icky.icky.ptang.zoop.boing.good. @10.53.0.6 > dig.out.test$n
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 grep "more.icky.icky.icky.ptang.zoop.boing.good. 1 IN  A 192.0.2.2" dig.out.test$n > /dev/null || ret=1
+sleep 1
 cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
 NS boing.good.
 NS zoop.boing.good.
index 8c0b68e52ad17de91343cb0ed02583d7f5edc015..cbcff2d856902d847a05802fc866fb79d68faa77 100644 (file)
@@ -2952,7 +2952,7 @@ static cfg_type_t cfg_type_optional_keyref = {
 };
 
 static const char *qminmethod_enums[] = {
-       "strict", "relaxed", "disabled", NULL
+       "strict", "relaxed", "disabled", "off", NULL
 };
 
 static cfg_type_t cfg_type_qminmethod = {
index 84bfd1ed006e4ab898215fb24911051a2d93e28c..0750f5dfcc1004859bbd55dfacd97a19f1c75206 100644 (file)
 ./bin/tests/system/qmin/ns5/named.conf.in      CONF-C  2018
 ./bin/tests/system/qmin/ns6/named.conf.in      CONF-C  2018
 ./bin/tests/system/qmin/ns7/named.conf.in      CONF-C  2018
+./bin/tests/system/qmin/prereq.sh              SH      2018
 ./bin/tests/system/qmin/setup.sh               SH      2018
 ./bin/tests/system/qmin/tests.sh               SH      2018
 ./bin/tests/system/reclimit/README             TXT.BRIEF       2014,2016,2017,2018