mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 07:12:11 -04:00
4192. [bug] The default rrset-order of random was not always being
applied. [RT #40456]
This commit is contained in:
parent
5855fd79e3
commit
9b956d342e
4 changed files with 72 additions and 1 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
4192. [bug] The default rrset-order of random was not always being
|
||||
applied. [RT #40456]
|
||||
|
||||
4191. [protocol] Accept DNS-SD non LDH PTR records in reverse zones
|
||||
as per RFC 6763. [RT #37889]
|
||||
|
||||
|
|
|
|||
41
bin/tests/system/rrsetorder/ns4/named.conf
Normal file
41
bin/tests/system/rrsetorder/ns4/named.conf
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (C) 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: named.conf,v 1.5 2007/06/18 23:47:30 tbox Exp $ */
|
||||
|
||||
controls { /* empty */ };
|
||||
|
||||
options {
|
||||
query-source address 10.53.0.4;
|
||||
notify-source 10.53.0.4;
|
||||
transfer-source 10.53.0.4;
|
||||
port 5300;
|
||||
pid-file "named.pid";
|
||||
listen-on { 10.53.0.4; };
|
||||
listen-on-v6 { none; };
|
||||
recursion yes;
|
||||
acache-enable yes;
|
||||
notify yes;
|
||||
rrset-order {
|
||||
class IN type A name "host.example.com" order random;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
zone "." {
|
||||
type hint;
|
||||
file "../../common/root.hint";
|
||||
};
|
||||
|
|
@ -446,6 +446,33 @@ echo "I: Random selection return $match of 24 possible orders in 36 samples"
|
|||
if [ $match -lt 8 ]; then echo ret=1; fi
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
|
||||
echo "I: Checking default order no match in rrset-order (random)"
|
||||
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
|
||||
$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
|
||||
-p 5300 @10.53.0.4 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 "cmp -s dig.out.random dig.out.random.good$j && 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: Random selection return $match of 24 possible orders in 36 samples"
|
||||
if [ $match -lt 8 ]; then echo ret=1; fi
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
|
||||
status=`expr $status + $ret`
|
||||
echo "I:exit status: $status"
|
||||
exit $status
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ dns_order_find(dns_order_t *order, dns_name_t *name,
|
|||
if (match(name, dns_fixedname_name(&ent->name)))
|
||||
return (ent->mode);
|
||||
}
|
||||
return (0);
|
||||
return (DNS_RDATASETATTR_RANDOMIZE);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in a new issue