diff options
author | 1999-12-16 03:13:24 +0000 | |
---|---|---|
committer | 1999-12-16 03:13:24 +0000 | |
commit | e430c775e6a2106f8cf00ee9d942308ef5f34d09 (patch) | |
tree | 67aa526b29a1b5efc2e881f9c785b798bad96891 | |
parent | non-working awi driver; someone finish it (diff) | |
download | wireguard-openbsd-e430c775e6a2106f8cf00ee9d942308ef5f34d09.tar.xz wireguard-openbsd-e430c775e6a2106f8cf00ee9d942308ef5f34d09.zip |
use arc4random()
-rw-r--r-- | usr.sbin/rtsold/rtsold.c | 7 |
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; |