diff options
author | 1996-07-29 06:22:12 +0000 | |
---|---|---|
committer | 1996-07-29 06:22:12 +0000 | |
commit | 32f9faca8b96dba6a8601f5c30bffc6aab6def65 (patch) | |
tree | f023e1243fae47379dcb26c49bb30522c88ede12 /sys/netinet/tcp_subr.c | |
parent | ensure bindresvport() is told to find a port (diff) | |
download | wireguard-openbsd-32f9faca8b96dba6a8601f5c30bffc6aab6def65.tar.xz wireguard-openbsd-32f9faca8b96dba6a8601f5c30bffc6aab6def65.zip |
Make TCP ISS increment by random amounts
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index f5cc98bef5b..fdb7205f2b9 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.5 1996/05/15 09:32:01 mickey Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.6 1996/07/29 06:22:14 tholo Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -91,8 +91,13 @@ int tcbhashsize = TCBHASHSIZE; void tcp_init() { - +#ifdef TCP_COMPAT_42 tcp_iss = 1; /* wrong */ +#else /* TCP_COMPAT_42 */ + u_int random __P((void)); + + tcp_iss = random() + 1; +#endif /* !TCP_COMPAT_42 */ in_pcbinit(&tcbtable, tcbhashsize); if (max_protohdr < sizeof(struct tcpiphdr)) max_protohdr = sizeof(struct tcpiphdr); |