From owner-freebsd-net@FreeBSD.ORG Sat Mar 31 07:53:38 2012 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 EB8A71065672 for ; Sat, 31 Mar 2012 07:53:38 +0000 (UTC) (envelope-from darernr@freebsd.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id B1D708FC0A for ; Sat, 31 Mar 2012 07:53:38 +0000 (UTC) Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id BE07320C7B for ; Sat, 31 Mar 2012 03:53:37 -0400 (EDT) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute4.internal (MEProxy); Sat, 31 Mar 2012 03:53:37 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=Hud9Bey83ynvFSoSkRYpb1 f3ZvQ=; b=VxhCeW0/1YC8x77+TRidF5gaOXgGCKEu9M1UEiQl4va3EIpPbZQ4Fb kT7mPa+uZmw9XRo5LqJuHtIGK05HOTiYZk/pngYeIA2Oaj+xlBkDYq85983+Jymx T6PSYhLOR66v3Z1OkDOCHjzx9kaM7tzdAdePFNgbLY705pzxvrnAc= X-Sasl-enc: NNnmCopT2epMcm8t5EhgUy2wo05Gksk1oh4mNp8fj22R 1333180417 Received: from [192.168.1.23] (dsl-202-45-110-141-static.VIC.netspace.net.au [202.45.110.141]) by mail.messagingengine.com (Postfix) with ESMTPSA id 9A1F38E00B7; Sat, 31 Mar 2012 03:53:36 -0400 (EDT) Message-ID: <4F76C61A.1000704@freebsd.org> Date: Sat, 31 Mar 2012 19:53:46 +1100 From: Darren Reed User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Jason Hellenthal References: <4F75C1A3.4030401@freebsd.org> <20120330160055.GB78586@DataIX.net> In-Reply-To: <20120330160055.GB78586@DataIX.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD TCP ignores zero window size 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: Sat, 31 Mar 2012 07:53:39 -0000 Jason Hellenthal wrote: > On Sat, Mar 31, 2012 at 01:22:27AM +1100, Darren Reed wrote: > >> I've been tracking down some problems with FreeBSD's sending >> of TCP packets and seem to have come to the conclusion that >> in FreeBSD 8.2-RELEASE, when the system is working with a >> TCP connection that has a moderate delay in it, FreeBSD's >> TCP ignores the other end telling it that the window size >> is now 0 and continues to send data. I suspect that this is >> meant to make sense because it is expecting that the ACK >> that will open up the window is already in transit. But that >> only accounts for the condition where the TCP on FreeBSD can >> compute and decide that the remote TCP will have its buffer >> full. What I find harder to accept is that when FreeBSD's >> TCP receives a TCP packet from the remote end advertising >> a window of 0, FreeBSD's response is to send more data and >> not a window probe or is that now the expected behaviour? >> And whilst you might say "ok" for a packet of data, I'm >> somewhat hard pressed to explain why FreeBSD's TCP sends >> multiple packets with data in them after receiving a TCP >> packet from the other end advertising a zero window size. >> >> However this causes a problem with firewalls (;_) that are >> close to the FreeBSD end because for them, it appears that >> FreeBSD is sending data outside of its window. >> >> Is this a known problem? >> If so, has it been fixed in a later version of FreeBSD? >> (No, I haven't tested anything other than 8.2) >> >> In the packet flow below, 192.168.1.1 is FreeBSD and 10.1.1.1 >> is the other end. >> >> Darren >> > > Hi Darren, > > I do believe this is the following bug at first glance that was patched > after 8.2-RELEASE. and has to do more with x64 systems more than x32. > > See: "A Tale of a TCP Bug" for details... > > http://blogmal.42.org/tidbits/tcp-bug.story > > http://lists.freebsd.org/pipermail/freebsd-net/2011-April/028466.html > That patch alone is not enough to fix the problem - I still see FreeBSD 8.2 sending out data after it has received a TCP packet with a window size of 0. Next I'll try adding Andre's. Darren