From owner-freebsd-net@FreeBSD.ORG Tue Apr 3 22:59:30 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 55CB21065672 for ; Tue, 3 Apr 2012 22:59:30 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id AC33F8FC19 for ; Tue, 3 Apr 2012 22:59:29 +0000 (UTC) Received: (qmail 28368 invoked from network); 3 Apr 2012 22:57:41 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 3 Apr 2012 22:57:41 -0000 Message-ID: <4F7B80CE.90805@freebsd.org> Date: Wed, 04 Apr 2012 00:59:26 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: darrenr@freebsd.org References: <4F75C1A3.4030401@freebsd.org> <4F75D9ED.7080707@freebsd.org> <4F780373.6030107@freebsd.org> <4F7AFEEF.60708@freebsd.org> <4F7B1981.1050009@freebsd.org> In-Reply-To: <4F7B1981.1050009@freebsd.org> 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: Tue, 03 Apr 2012 22:59:30 -0000 On 03.04.2012 17:38, Darren Reed wrote: > On 3/04/2012 11:45 PM, Andre Oppermann wrote: >> On 01.04.2012 09:27, Darren Reed wrote: >>> The problem here is that it only tracks the window size as >>> it grows, not as it shrinks. Thus the remote end setting its >>> window size to 0 is ignored. >> >> My patch is wrong as the acked count is already integrated >> by the time we reach this spot. I'm working on a better >> implementation. > > Ok, I'll look forward to seeing and testing it. Please test this patch: http://people.freebsd.org/~andre/tcp_input.c-windowupdate-2012040.diff I just completed a number of tests and inspected the debug output as well as the corresponding tcpdumps. In all could simulate it behaved correctly now with regard to tracking the window and updates. -- Andre