]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Restore default rrset-order to random.
authorMark Andrews <marka@isc.org>
Fri, 15 Jun 2018 03:34:27 +0000 (13:34 +1000)
committerMark Andrews <marka@isc.org>
Tue, 19 Jun 2018 00:23:44 +0000 (10:23 +1000)
CHANGES
bin/named/config.c
bin/tests/system/rrsetorder/ns5/named.conf.in [new file with mode: 0644]
bin/tests/system/rrsetorder/setup.sh
bin/tests/system/rrsetorder/tests.sh
util/copyrights

diff --git a/CHANGES b/CHANGES
index 4e66137b0a3b4bfceb157f4c579d5e1f43761d5f..5e10b9dc99825dfb71e11cfc1edd08c63054f048 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+4974.  [bug]           Restore default rrset-order to random. [GL #336]
+
 4973.  [func]          verifyzone() and the functions it uses were moved to
                        libdns and refactored to prevent exit() from being
                        called upon failure.  A side effect of that is that
index 14b322875023a9ccf31f95bb29116cd280dc621c..ad310307d37764930ff9cc2d89a330846c81d330 100644 (file)
@@ -96,6 +96,7 @@ options {\n\
        request-nsid false;\n\
        reserved-sockets 512;\n\
        resolver-query-timeout 10;\n\
+       rrset-order { order random; };\n\
        secroots-file \"named.secroots\";\n\
        send-cookie true;\n\
 #      serial-queries <obsolete>;\n\
diff --git a/bin/tests/system/rrsetorder/ns5/named.conf.in b/bin/tests/system/rrsetorder/ns5/named.conf.in
new file mode 100644 (file)
index 0000000..005c631
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+options {
+       query-source address 10.53.0.5;
+       notify-source 10.53.0.5;
+       transfer-source 10.53.0.5;
+       port @PORT@;
+       pid-file "named.pid";
+       listen-on { 10.53.0.5; };
+       listen-on-v6 { none; };
+       recursion yes;
+       dnssec-validation yes;
+       notify yes;
+};
+
+zone "." {
+       type hint;
+       file "../../common/root.hint";
+};
index 3a14fe9e3ac85392b4f9f2a0af994a7a2c3b24d2..c63aeb10d2a345e3dba4055bab5ed62de0d54ce3 100644 (file)
@@ -17,3 +17,4 @@ copy_setports ns1/named.conf.in ns1/named.conf
 copy_setports ns2/named.conf.in ns2/named.conf
 copy_setports ns3/named.conf.in ns3/named.conf
 copy_setports ns4/named.conf.in ns4/named.conf
+copy_setports ns5/named.conf.in ns5/named.conf
index c0d6b2054e2bd3360c41287006cb64dd65a71db6..35ba87a0291570ee68b0f377782ded2132dc0380 100644 (file)
@@ -136,7 +136,7 @@ do
        eval "match=\`expr \$match + \$match$i\`"
 done
 echo_i "Random selection return $match of 24 possible orders in 36 samples"
-if [ $match -lt 8 ]; then echo ret=1; fi
+if [ $match -lt 8 ]; then ret=1; fi
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
@@ -230,7 +230,7 @@ do
 eval "match=\`expr \$match + \$match$i\`"
 done
 echo_i "Random selection return $match of 24 possible orders in 36 samples"
-if [ $match -lt 8 ]; then echo ret=1; fi
+if [ $match -lt 8 ]; then ret=1; fi
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
@@ -340,7 +340,7 @@ do
 eval "match=\`expr \$match + \$match$i\`"
 done
 echo_i "Random selection return $match of 24 possible orders in 36 samples"
-if [ $match -lt 8 ]; then echo ret=1; fi
+if [ $match -lt 8 ]; then ret=1; fi
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
@@ -438,7 +438,33 @@ do
 eval "match=\`expr \$match + \$match$i\`"
 done
 echo_i "Random selection return $match of 24 possible orders in 36 samples"
-if [ $match -lt 8 ]; then echo ret=1; fi
+if [ $match -lt 8 ]; then ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
+
+echo_i "Checking default order (cache)"
+ret=0
+for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
+do
+       eval match$i=0
+done
+for i in 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 0 1 2 3 4 5 6 7 9
+do
+       $DIGCMD @10.53.0.5 random.example > dig.out.random || ret=1
+       match=0
+       for j in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
+       do
+               eval "$DIFF dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
+               if [ $match -eq 1 ]; then break; fi
+       done
+       if [ $match -eq 0 ]; then ret=1; fi
+done
+match=0
+for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
+do
+eval "match=\`expr \$match + \$match$i\`"
+done
+echo_i "Default selection return $match of 24 possible orders in 36 samples"
+if [ $match -lt 8 ]; then ret=1; fi
 if [ $ret != 0 ]; then echo_i "failed"; fi
 
 echo_i "Checking default order no match in rrset-order (no shuffling)"
@@ -464,7 +490,7 @@ do
 eval "match=\`expr \$match + \$match$i\`"
 done
 echo_i "Consistent selection return $match of 24 possible orders in 36 samples"
-if [ $match -ne 1 ]; then echo ret=1; fi
+if [ $match -ne 1 ]; then ret=1; fi
 if [ $ret != 0 ]; then echo_i "failed"; fi
 
 status=`expr $status + $ret`
index d9480506173bfdf6b54112a125681f95ea1be213..32f7aaa31cc9a6341b339d561eae5edc94dcdcf0 100644 (file)
 ./bin/tests/system/rrsetorder/ns2/named.conf.in        CONF-C  2006,2007,2016,2018
 ./bin/tests/system/rrsetorder/ns3/named.conf.in        CONF-C  2006,2007,2016,2017,2018
 ./bin/tests/system/rrsetorder/ns4/named.conf.in        CONF-C  2015,2016,2017,2018
+./bin/tests/system/rrsetorder/ns5/named.conf.in        CONF-C  2018
 ./bin/tests/system/rrsetorder/setup.sh         SH      2018
 ./bin/tests/system/rrsetorder/tests.sh         SH      2006,2007,2008,2011,2012,2014,2015,2016,2017,2018
 ./bin/tests/system/rsabigexponent/.gitignore   X       2013,2018