mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Only get one random number per response when order == random
This commit is contained in:
parent
9c4fb3b3e6
commit
f7986c8d1a
1 changed files with 1 additions and 2 deletions
|
|
@ -409,9 +409,8 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
|
|||
/*
|
||||
* 'Random' order.
|
||||
*/
|
||||
isc_uint32_t val = isc_random32();
|
||||
for (i = 0; i < count; i++) {
|
||||
isc_uint32_t val = isc_random32();
|
||||
|
||||
choice = i + val % (count - i);
|
||||
rdata = in[i];
|
||||
in[i] = in[choice];
|
||||
|
|
|
|||
Loading…
Reference in a new issue