summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1999-09-01 21:38:22 +0000
committerNiels Provos <provos@cvs.openbsd.org>1999-09-01 21:38:22 +0000
commit4798a08b30eee9941f3874fc645e6926ad7327e8 (patch)
tree00089c741f24dccfbf2a94e522e1e9d116dbc481 /sys
parent191b40e6bd025ee149a451358c4be60520c1cb73 (diff)
increase tcp_iss increment
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/tcp_input.c4
-rw-r--r--sys/netinet/tcp_timer.c4
-rw-r--r--sys/netinet/tcp_usrreq.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 6a0ddf23205..3105fbea9fd 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.48 1999/08/31 21:41:05 provos Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.49 1999/09/01 21:38:21 provos Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -1011,7 +1011,7 @@ findpcb:
#ifdef TCP_COMPAT_42
tcp_iss += TCP_ISSINCR/2;
#else /* TCP_COMPAT_42 */
- tcp_iss += arc4random() % (TCP_ISSINCR / 2) + 1;
+ tcp_iss += arc4random() % TCP_ISSINCR + 1;
#endif /* !TCP_COMPAT_42 */
tp->irs = th->th_seq;
tcp_sendseqinit(tp);
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index e8017b293b3..79d318637b9 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_timer.c,v 1.13 1999/07/02 20:39:08 cmetz Exp $ */
+/* $OpenBSD: tcp_timer.c,v 1.14 1999/09/01 21:38:21 provos Exp $ */
/* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */
/*
@@ -144,7 +144,7 @@ tpgone:
if ((int)tcp_iss < 0)
tcp_iss = 0; /* XXX */
#else /* TCP_COMPAT_42 */
- tcp_iss += arc4random() % (TCP_ISSINCR / PR_SLOWHZ) + 1; /* increment iss */
+ tcp_iss += arc4random() % (2 * TCP_ISSINCR / PR_SLOWHZ) + 1; /* increment iss */
#endif /* !TCP_COMPAT_42 */
tcp_now++; /* for timestamps */
splx(s);
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index d9ca963cc58..4868d9728f4 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.35 1999/07/06 20:17:53 cmetz Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.36 1999/09/01 21:38:21 provos Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -316,7 +316,7 @@ tcp_usrreq(so, req, m, nam, control)
#ifdef TCP_COMPAT_42
tcp_iss += TCP_ISSINCR/2;
#else /* TCP_COMPAT_42 */
- tcp_iss += arc4random() % (TCP_ISSINCR / 2) + 1;
+ tcp_iss += arc4random() % TCP_ISSINCR + 1;
#endif /* !TCP_COMPAT_42 */
tcp_sendseqinit(tp);
#if defined(TCP_SACK) || defined(TCP_NEWRENO)