mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Only get one random number per response when order == random
This commit is contained in:
committed by
Ondřej Surý
parent
9c4fb3b3e6
commit
f7986c8d1a
@@ -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];
|
||||
|
Reference in New Issue
Block a user