Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 May 2016 23:22:19 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r299777 - head/sbin/routed
Message-ID:  <201605142322.u4ENMJBs083817@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Sat May 14 23:22:19 2016
New Revision: 299777
URL: https://svnweb.freebsd.org/changeset/base/299777

Log:
  routed(8): Use arc4random.
  
  CID:		1305962
  Obtained from:	NetBSD (CVS Rev. 1.34, Itojun)

Modified:
  head/sbin/routed/main.c

Modified: head/sbin/routed/main.c
==============================================================================
--- head/sbin/routed/main.c	Sat May 14 23:20:46 2016	(r299776)
+++ head/sbin/routed/main.c	Sat May 14 23:22:19 2016	(r299777)
@@ -826,8 +826,8 @@ intvl_random(struct timeval *tp,	/* put 
 {
 	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;
 }
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605142322.u4ENMJBs083817>