aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rtsold
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2015-10-06 23:42:58 +0000
committerXin LI <delphij@FreeBSD.org>2015-10-06 23:42:58 +0000
commit56160b2e676373344fc2f4edb9e7b4869cf74b7d (patch)
treec66679f47f5b5ea09b5747129b834b5ab09052b3 /usr.sbin/rtsold
parente72879e554a04c16f263f5dcb071783d519f9524 (diff)
Notes
Diffstat (limited to 'usr.sbin/rtsold')
-rw-r--r--usr.sbin/rtsold/Makefile1
-rw-r--r--usr.sbin/rtsold/rtsold.c8
2 files changed, 0 insertions, 9 deletions
diff --git a/usr.sbin/rtsold/Makefile b/usr.sbin/rtsold/Makefile
index caef62c78d87..84cf0b2500d4 100644
--- a/usr.sbin/rtsold/Makefile
+++ b/usr.sbin/rtsold/Makefile
@@ -20,6 +20,5 @@ MLINKS= rtsold.8 rtsol.8
SRCS= rtsold.c rtsol.c if.c probe.c dump.c rtsock.c
WARNS?= 3
-CFLAGS+= -DHAVE_ARC4RANDOM
.include <bsd.prog.mk>
diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c
index 18621bdfdcf1..85ee133e9b6c 100644
--- a/usr.sbin/rtsold/rtsold.c
+++ b/usr.sbin/rtsold/rtsold.c
@@ -214,10 +214,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) {
@@ -725,11 +721,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;