summaryrefslogtreecommitdiff
path: root/usr.sbin/rtsold
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-16 03:13:25 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-16 03:13:25 +0000
commitfbff46d9e73973540390ac8aee16447491aa4cc7 (patch)
tree328d3036c3ba74c383a1cef75606dc02ee0c9e41 /usr.sbin/rtsold
parent9820c70e81e5a4573ba2dd0734d46d425cdfe521 (diff)
use arc4random()
Diffstat (limited to 'usr.sbin/rtsold')
-rw-r--r--usr.sbin/rtsold/rtsold.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c
index 5ce7e12e359..d8b04a18864 100644
--- a/usr.sbin/rtsold/rtsold.c
+++ b/usr.sbin/rtsold/rtsold.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsold.c,v 1.2 1999/12/09 15:10:49 itojun Exp $ */
+/* $OpenBSD: rtsold.c,v 1.3 1999/12/16 03:13:24 deraadt Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -161,9 +161,6 @@ main(argc, argv)
setlogmask(LOG_UPTO(log_upto));
}
- /* random value initilization */
- srandom((u_long)time(NULL));
-
/* warn if accept_rtadv is down */
if (!getinet6sysctl(IPV6CTL_ACCEPT_RTADV))
warnx("kernel is configured not to accept RAs");
@@ -506,7 +503,7 @@ rtsol_timer_update(struct ifinfo *ifinfo)
ifinfo->timer = tm_max; /* stop timer(valid?) */
break;
case IFS_DELAY:
- interval = random() % (MAX_RTR_SOLICITATION_DELAY * MILLION);
+ interval = arc4random() % (MAX_RTR_SOLICITATION_DELAY * MILLION);
ifinfo->timer.tv_sec = interval / MILLION;
ifinfo->timer.tv_usec = interval % MILLION;
break;