summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2008-02-11 18:03:17 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2008-02-11 18:03:17 +0000
commite1a1163925c6ab56d029629de9c3bd8b72cb9555 (patch)
treeb89ad81f501c76b973a815177e91035a7e04829a /sys/netinet/tcp_input.c
parent2a92b6e0386b99a5324d061aa42273e50144fd37 (diff)
The TCP server has to recalculate the client's window size taken
from the first ACK packet. Otherwise the server would use the unscaled window size for the fist data it is sending. ok markus@ dhartmei@
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 89f59938c1c..a5b0b39b2b0 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.210 2007/11/27 17:23:23 deraadt Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.211 2008/02/11 18:03:16 bluhm Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -1504,6 +1504,7 @@ trimthenstep6:
(TF_RCVD_SCALE|TF_REQ_SCALE)) {
tp->snd_scale = tp->requested_s_scale;
tp->rcv_scale = tp->request_r_scale;
+ tiwin = th->th_win << tp->snd_scale;
}
tcp_reass_lock(tp);
(void) tcp_reass(tp, (struct tcphdr *)0, (struct mbuf *)0,
@@ -3789,8 +3790,6 @@ syn_cache_get(src, dst, th, hlen, tlen, so, m)
if (sc->sc_request_r_scale != 15) {
tp->requested_s_scale = sc->sc_requested_s_scale;
tp->request_r_scale = sc->sc_request_r_scale;
- tp->snd_scale = sc->sc_requested_s_scale;
- tp->rcv_scale = sc->sc_request_r_scale;
tp->t_flags |= TF_REQ_SCALE|TF_RCVD_SCALE;
}
if (sc->sc_flags & SCF_TIMESTAMP)