summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2004-07-16 09:26:07 +0000
committermarkus <markus@openbsd.org>2004-07-16 09:26:07 +0000
commit51947cffde66b62365bcf055381c4c0e7bfcc7c0 (patch)
treebd3d77652843eb9b8a2f8eb77fad8077002d9eea /sys/netinet/tcp_input.c
parentAvoid generating an unused variable. From NetBSD. ok deraadt@ (diff)
downloadwireguard-openbsd-51947cffde66b62365bcf055381c4c0e7bfcc7c0.tar.xz
wireguard-openbsd-51947cffde66b62365bcf055381c4c0e7bfcc7c0.zip
undo 1.148, otherwise we have assymmetric cwnd when entering ESTABLISHED:
2mss on the server side, and 1mss on the client.
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 4e444260b28..f0470d8c8af 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.174 2004/06/20 18:16:50 itojun Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.175 2004/07/16 09:26:07 markus Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -1203,6 +1203,15 @@ after_listen:
*/
if (tp->t_rtttime)
tcp_xmit_timer(tp, tcp_now - tp->t_rtttime);
+ /*
+ * Since new data was acked (the SYN), open the
+ * congestion window by one MSS. We do this
+ * here, because we won't go through the normal
+ * ACK processing below. And since this is the
+ * start of the connection, we know we are in
+ * the exponential phase of slow-start.
+ */
+ tp->snd_cwnd += tp->t_maxseg;
} else
tp->t_state = TCPS_SYN_RECEIVED;