From 970caf60dd1c10c88cacb862d61bc7e8ac8a91e4 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Tue, 7 Apr 2009 14:42:40 +0000 Subject: [PATCH] With the right comparison we get a proper wscale value and thus more adequate TCP performance with IPv6. Changes for IPv4, r166403 and r172795, both ignored the IPv6 counterpart and left it in the state of art of year 2000. The same logic in syncache already shares code between v4 and v6 so things do not need to be adapted there. Reported by: Steinar Haug (sthaug nethelp.no) Tested by: Steinar Haug (sthaug nethelp.no) MFC after: 3 days --- sys/netinet/tcp_usrreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index bce4e10b143..5a6d183af44 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1173,7 +1173,7 @@ tcp6_connect(struct tcpcb *tp, struct sockaddr *nam, struct thread *td) /* Compute window scaling to request. */ while (tp->request_r_scale < TCP_MAX_WINSHIFT && - (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat) + (TCP_MAXWIN << tp->request_r_scale) < sb_max) tp->request_r_scale++; soisconnecting(so);