diff options
author | 1997-02-05 15:48:21 +0000 | |
---|---|---|
committer | 1997-02-05 15:48:21 +0000 | |
commit | e7dfcc6ddd2cf1ea170e7a3d6199fae22924698c (patch) | |
tree | f31d23046fe1ec73ba4addbe4f21dca5c252f53a /sys/netinet/tcp_subr.c | |
parent | document that ip_off and ip_len are now in network byte order (diff) | |
download | wireguard-openbsd-e7dfcc6ddd2cf1ea170e7a3d6199fae22924698c.tar.xz wireguard-openbsd-e7dfcc6ddd2cf1ea170e7a3d6199fae22924698c.zip |
use arc4random()
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 09d139a31b0..c53bc198c12 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.7 1996/07/29 22:01:50 niklas Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.8 1997/02/05 15:48:25 deraadt Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -61,6 +61,7 @@ #include <netinet/tcp_timer.h> #include <netinet/tcp_var.h> #include <netinet/tcpip.h> +#include <dev/rndvar.h> /* patchable/settable parameters for tcp */ int tcp_mssdflt = TCP_MSS; @@ -94,7 +95,7 @@ tcp_init() #ifdef TCP_COMPAT_42 tcp_iss = 1; /* wrong */ #else /* TCP_COMPAT_42 */ - tcp_iss = random() + 1; + tcp_iss = arc4random() + 1; #endif /* !TCP_COMPAT_42 */ in_pcbinit(&tcbtable, tcbhashsize); if (max_protohdr < sizeof(struct tcpiphdr)) |