summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-02-05 15:48:21 +0000
committerderaadt <deraadt@openbsd.org>1997-02-05 15:48:21 +0000
commite7dfcc6ddd2cf1ea170e7a3d6199fae22924698c (patch)
treef31d23046fe1ec73ba4addbe4f21dca5c252f53a /sys/netinet/tcp_input.c
parentdocument that ip_off and ip_len are now in network byte order (diff)
downloadwireguard-openbsd-e7dfcc6ddd2cf1ea170e7a3d6199fae22924698c.tar.xz
wireguard-openbsd-e7dfcc6ddd2cf1ea170e7a3d6199fae22924698c.zip
use arc4random()
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index e0d20e0c6f1..ea37f2be8d5 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.8 1996/09/25 11:39:56 niklas Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.9 1997/02/05 15:48:24 deraadt Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -61,6 +61,7 @@
#include <netinet/tcp_var.h>
#include <netinet/tcpip.h>
#include <netinet/tcp_debug.h>
+#include <dev/rndvar.h>
#include <machine/stdarg.h>
@@ -676,7 +677,7 @@ findpcb:
#ifdef TCP_COMPAT_42
tcp_iss += TCP_ISSINCR/2;
#else /* TCP_COMPAT_42 */
- tcp_iss += random() % (TCP_ISSINCR / 2) + 1;
+ tcp_iss += arc4random() % (TCP_ISSINCR / 2) + 1;
#endif /* !TCP_COMPAT_42 */
tp->irs = ti->ti_seq;
tcp_sendseqinit(tp);