2
0
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:
Mark Andrews
2018-08-05 07:23:07 +02:00
committed by Ondřej Surý
parent 9c4fb3b3e6
commit f7986c8d1a

View File

@@ -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];