summaryrefslogtreecommitdiff
path: root/sbin/routed
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/routed')
-rw-r--r--sbin/routed/Makefile3
-rw-r--r--sbin/routed/main.c9
2 files changed, 5 insertions, 7 deletions
diff --git a/sbin/routed/Makefile b/sbin/routed/Makefile
index 75e60b2b48e..8860d2da927 100644
--- a/sbin/routed/Makefile
+++ b/sbin/routed/Makefile
@@ -1,11 +1,10 @@
-# $OpenBSD: Makefile,v 1.9 1997/11/18 21:31:50 kstailey Exp $
+# $OpenBSD: Makefile,v 1.10 2002/02/16 20:25:02 millert Exp $
PROG= routed
SRCS= if.c input.c main.c output.c parms.c radix.c rdisc.c table.c trace.c
MAN= routed.8
CFLAGS+=-D_ROUTED -D'min(a,b)=(a < b ? a : b)' -D'log=syslog'
CFLAGS+=-D'panic(s)={log(LOG_ERR,s); exit(1);}'
-CFLAGS+=-D'random()=arc4random()'
SUBDIR= rtquery
DPADD= ${LIBCOMPAT}
LDADD= -lcompat
diff --git a/sbin/routed/main.c b/sbin/routed/main.c
index 2ff8bb2cc55..a180aced785 100644
--- a/sbin/routed/main.c
+++ b/sbin/routed/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.12 2001/07/07 18:26:20 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.13 2002/02/16 20:25:02 millert Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -39,7 +39,7 @@ char copyright[] =
#if !defined(lint)
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.12 2001/07/07 18:26:20 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.13 2002/02/16 20:25:02 millert Exp $";
#endif
#include "defs.h"
@@ -276,7 +276,6 @@ usage:
}
mypid = getpid();
- srandom((int)(clk.tv_sec ^ clk.tv_usec ^ mypid));
/* prepare socket connected to the kernel.
*/
@@ -771,8 +770,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;
}