summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2000-07-11 16:53:23 +0000
committerNiels Provos <provos@cvs.openbsd.org>2000-07-11 16:53:23 +0000
commit3444ec18a3a9dcc78172d723c263a4dba26c3564 (patch)
treec6c8fda68af2b02b04c445da964f2a5d44fdf10b /sys/netinet/tcp_usrreq.c
parent402a7c0a4c7f46e931d0f1881c10daa11262250e (diff)
compute correct window scale when recvpipe option is set in route; based
on diff from "Pete Kazmier" <pete@kazmier.com>
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 5befff1b9bc..c0646e89a2e 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.45 2000/07/06 05:24:45 itojun Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.46 2000/07/11 16:53:22 provos Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -300,9 +300,8 @@ tcp_usrreq(so, req, m, nam, control)
so->so_state |= SS_CONNECTOUT;
/* Compute window scaling to request. */
- while (tp->request_r_scale < TCP_MAX_WINSHIFT &&
- (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat)
- tp->request_r_scale++;
+ tcp_rscale(tp, so->so_rcv.sb_hiwat);
+
soisconnecting(so);
tcpstat.tcps_connattempt++;
tp->t_state = TCPS_SYN_SENT;