diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-05 15:48:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-05 15:48:28 +0000 |
commit | dcf1564410bf65a4cd4a25a9fde1c734a56da5c7 (patch) | |
tree | fb12cd1f1d1be670d711e6254e8518485f6ef304 /sys/netinet/in_pcb.c | |
parent | 08d997804215097a2147a9f4bbe81f8cf62516d7 (diff) |
use arc4random()
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r-- | sys/netinet/in_pcb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 3a74cd535f2..ff1f639563c 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.c,v 1.13 1997/01/15 03:27:14 kstailey Exp $ */ +/* $OpenBSD: in_pcb.c,v 1.14 1997/02/05 15:48:23 deraadt Exp $ */ /* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */ /* @@ -57,6 +57,7 @@ #include <netinet/in_pcb.h> #include <netinet/in_var.h> #include <netinet/ip_var.h> +#include <dev/rndvar.h> struct in_addr zeroin_addr; @@ -217,7 +218,7 @@ portloop: */ if (loopcount == 0) { /* only do this once. */ old = first; - first -= (random() % (first - last)); + first -= (arc4random() % (first - last)); } count = first - last; @@ -243,7 +244,7 @@ portloop: */ if (loopcount == 0) { /* only do this once. */ old = first; - first += (random() % (last - first)); + first += (arc4random() % (last - first)); } count = last - first; |