mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-25 16:13:17 +00:00
Change arc4random to arc4random_uniform since modulo is not power of 2,
as OpenBSD does. Obtained from: OpenBSD
This commit is contained in:
parent
f90b161b21
commit
a08f0b20be
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=180824
@ -683,7 +683,7 @@ rtsol_timer_update(struct ifinfo *ifinfo)
|
||||
#ifndef HAVE_ARC4RANDOM
|
||||
interval = random() % (MAX_RTR_SOLICITATION_DELAY * MILLION);
|
||||
#else
|
||||
interval = arc4random() % (MAX_RTR_SOLICITATION_DELAY * MILLION);
|
||||
interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * MILLION);
|
||||
#endif
|
||||
ifinfo->timer.tv_sec = interval / MILLION;
|
||||
ifinfo->timer.tv_usec = interval % MILLION;
|
||||
|
Loading…
Reference in New Issue
Block a user