summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtsold/rtsold.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2015-10-29 16:53:34 +0000
committerdelphij <delphij@FreeBSD.org>2015-10-29 16:53:34 +0000
commit73d04e0e3d8a68ad719134d40eb89a14bff4694e (patch)
tree810b6722357e4b14a7fe1799f71e3ea886cd8be5 /usr.sbin/rtsold/rtsold.c
parentec25e45f25b186456ac1e61b723961d214efca64 (diff)
downloadFreeBSD-src-73d04e0e3d8a68ad719134d40eb89a14bff4694e.zip
FreeBSD-src-73d04e0e3d8a68ad719134d40eb89a14bff4694e.tar.gz
MFC r288963:
Now that we own the code, use arc4random(3) unconditionally and remove the corresponding HAVE_ARC4RANDOM conditions.
Diffstat (limited to 'usr.sbin/rtsold/rtsold.c')
-rw-r--r--usr.sbin/rtsold/rtsold.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c
index a97b884..46bdb1e 100644
--- a/usr.sbin/rtsold/rtsold.c
+++ b/usr.sbin/rtsold/rtsold.c
@@ -223,10 +223,6 @@ main(int argc, char **argv)
errx(1, "pid filename (%s) must be an absolute path",
pidfilename);
}
-#ifndef HAVE_ARC4RANDOM
- /* random value initialization */
- srandom((u_long)time(NULL));
-#endif
#if (__FreeBSD_version < 900000)
if (Fflag) {
@@ -780,11 +776,7 @@ rtsol_timer_update(struct ifinfo *ifi)
ifi->timer = tm_max; /* stop timer(valid?) */
break;
case IFS_DELAY:
-#ifndef HAVE_ARC4RANDOM
- interval = random() % (MAX_RTR_SOLICITATION_DELAY * MILLION);
-#else
interval = arc4random_uniform(MAX_RTR_SOLICITATION_DELAY * MILLION);
-#endif
ifi->timer.tv_sec = interval / MILLION;
ifi->timer.tv_nsec = (interval % MILLION) * 1000;
break;
OpenPOWER on IntegriCloud