From owner-freebsd-net@FreeBSD.ORG Thu Jan 13 21:55:36 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63B7516A4CE for ; Thu, 13 Jan 2005 21:55:36 +0000 (GMT) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 657C343D46 for ; Thu, 13 Jan 2005 21:55:35 +0000 (GMT) (envelope-from oppermann@networx.ch) Received: (qmail 88718 invoked from network); 13 Jan 2005 21:38:57 -0000 Received: from unknown (HELO networx.ch) ([62.48.0.54]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 13 Jan 2005 21:38:57 -0000 Message-ID: <41E6EE58.EBF168A4@networx.ch> Date: Thu, 13 Jan 2005 22:55:36 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Girish Rayas References: <9c9fb1860501101737268508be@mail.gmail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-net@freebsd.org Subject: Re: Bug in TCP window update? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2005 21:55:36 -0000 Girish Rayas wrote: > > In tcp_input.c, window is updated when below condition is true, > > if ((thflags & TH_ACK) && > (SEQ_LT(tp->snd_wl1, th->th_seq) || > (tp->snd_wl1 == th->th_seq && (SEQ_LT(tp->snd_wl2, th->th_ack) || > (tp->snd_wl2 == th->th_ack && tiwin > tp->snd_wnd))))) > > This check is to prevent old segments from affecting the send window. > But, left trim logic that was executed earlier in tcp_input.c sets the > th->th_seq to > tp->rcv_nxt for old segments. In many scenarios this effectively causes > snd_wl1 < th_seq and results in incorrect window update by old > segments. > > Using actual sequence number of received segment in the above if > statement will fix the problem. Any comments? Please file a PR and post the PR number so we can track this properly. Thanks -- Andre