summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-05-14 23:22:19 +0000
committerpfg <pfg@FreeBSD.org>2016-05-14 23:22:19 +0000
commit1552c80595ca0d207cd88f655e84c2287d382432 (patch)
treeca5556277c19fbcbade8aee49448d1a29283bb1a
parent2da9b8914130a88acee5452000e543503435d317 (diff)
downloadFreeBSD-src-1552c80595ca0d207cd88f655e84c2287d382432.zip
FreeBSD-src-1552c80595ca0d207cd88f655e84c2287d382432.tar.gz
routed(8): Use arc4random.
CID: 1305962 Obtained from: NetBSD (CVS Rev. 1.34, Itojun)
-rw-r--r--sbin/routed/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/routed/main.c b/sbin/routed/main.c
index 226fe70..a6202fb 100644
--- a/sbin/routed/main.c
+++ b/sbin/routed/main.c
@@ -826,8 +826,8 @@ intvl_random(struct timeval *tp, /* put value here */
{
tp->tv_sec = (time_t)(hi == lo
? lo
- : (lo + random() % ((hi - lo))));
- tp->tv_usec = random() % 1000000;
+ : (lo + arc4random() % ((hi - lo))));
+ tp->tv_usec = arc4random() % 1000000;
}
OpenPOWER on IntegriCloud