diff options
author | 2000-12-13 09:47:08 +0000 | |
---|---|---|
committer | 2000-12-13 09:47:08 +0000 | |
commit | be03ea1b216c6f024fe4bee45b9d47130e8db47a (patch) | |
tree | 0980e13ee70fe584afb1e733888d2d947fd675fd /sys/netinet/tcp_input.c | |
parent | better debugging. reserve spis with the correct protocol. (diff) | |
download | wireguard-openbsd-be03ea1b216c6f024fe4bee45b9d47130e8db47a.tar.xz wireguard-openbsd-be03ea1b216c6f024fe4bee45b9d47130e8db47a.zip |
more random tcp sequence numbers. okay deraadt@, angelos@
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 8fc588e947f..75396e8974a 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.80 2000/12/11 08:04:55 itojun Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.81 2000/12/13 09:47:08 provos Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -1140,13 +1140,14 @@ findpcb: if (iss) tp->iss = iss; - else - tp->iss = tcp_iss; + else { #ifdef TCP_COMPAT_42 - tcp_iss += TCP_ISSINCR/2; + tcp_iss += TCP_ISSINCR/2; + tp->iss = tcp_iss; #else /* TCP_COMPAT_42 */ - tcp_iss += arc4random() % TCP_ISSINCR + 1; + tp->iss = tcp_rndiss_next(); #endif /* !TCP_COMPAT_42 */ + } tp->irs = th->th_seq; tcp_sendseqinit(tp); #if defined (TCP_SACK) |