From owner-freebsd-net@FreeBSD.ORG Fri Mar 25 19:41:11 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCAA9106564A; Fri, 25 Mar 2011 19:41:11 +0000 (UTC) (envelope-from sec@42.org) Received: from ice.42.org (v6.42.org [IPv6:2001:608:9::1]) by mx1.freebsd.org (Postfix) with ESMTP id 7FCD88FC0A; Fri, 25 Mar 2011 19:41:11 +0000 (UTC) Received: by ice.42.org (Postfix, from userid 1000) id AE50B28419; Fri, 25 Mar 2011 20:41:09 +0100 (CET) Date: Fri, 25 Mar 2011 20:41:09 +0100 From: Stefan `Sec` Zehl To: John Baldwin Message-ID: <20110325194109.GB25392@ice.42.org> Mail-Followup-To: John Baldwin , freebsd-net@freebsd.org, Doug Barton References: <4D8B99B4.4070404@FreeBSD.org> <201103241615.57852.jhb@freebsd.org> <20110324230235.GB90901@ice.42.org> <201103250825.10674.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201103250825.10674.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i I-love-doing-this: really X-Modeline: vim:set ts=8 sw=4 smarttab tw=72 si noic notitle: Accept-Languages: de, en X-URL: http://sec.42.org/ Cc: freebsd-net@freebsd.org, Doug Barton Subject: Re: The tale of a TCP bug X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2011 19:41:11 -0000 Hi, On Fri, Mar 25, 2011 at 08:25 -0400, John Baldwin wrote: > Ah, ok. Can you try this patch first (without the other)? If it doesn't > work then we can refine the patch above further. I tried it completely unpatched and with your new patch. In both cases that if() statement is not taken. Instrumenting this part of the code with printf()s shows that recwin is 65536 right after your patched if, but reduced to 65535 by the next statment. | if (recwin > (long)TCP_MAXWIN << tp->rcv_scale) | recwin = (long)TCP_MAXWIN << tp->rcv_scale; That's the same effect as in the the affected adv calculation: % long adv = min(recwin, (long)TCP_MAXWIN << tp->rcv_scale) - % (tp->rcv_adv - tp->rcv_nxt); recwin is 65535, but the min limits it to 65535. CU, Sec -- But anyway, once I did that, it ran fine! Accelerated, full-screen. Then I remembered I don't like Quake :-)