From owner-freebsd-net@FreeBSD.ORG Mon Jan 10 09:56:34 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 AD6FB16A4CF for ; Mon, 10 Jan 2005 09:56:34 +0000 (GMT) Received: from relay.pair.com (relay00.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id F1E4D43D54 for ; Mon, 10 Jan 2005 09:56:33 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 23840 invoked from network); 10 Jan 2005 09:56:33 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 10 Jan 2005 09:56:33 -0000 X-pair-Authenticated: 209.68.2.70 Date: Mon, 10 Jan 2005 03:56:31 -0600 (CST) From: Mike Silbersack To: Don Lewis In-Reply-To: <200501100850.j0A8o6FY019623@gw.catspoiler.org> Message-ID: <20050110034422.C9716@odysseus.silby.com> References: <200501100850.j0A8o6FY019623@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: net@FreeBSD.org Subject: Re: Slipping in the 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: Mon, 10 Jan 2005 09:56:34 -0000 On Mon, 10 Jan 2005, Don Lewis wrote: > Now that I've looked at the above case, it looks to me like your > suggested patch might affect the response to a legitimate duplicate SYN. > It will definitely follow a different code path. You're right, I neglected to handle the duplicate SYN case. Couldn't we centralize all SYN handling right after trimthenstep6:? We could do something there like if (th->th_seq != tp->irs) { goto dropafterack; /* Or however we handle these bad syns */ } else { thflags &= ~TH_SYN; th->th_seq++; if (th->th_urp > 1) th->th_urp--; else thflags &= ~TH_URG; todrop--; } And then we could tear out all the two places TH_SYN is mentioned below, the place I copied from, and the place where there the tcp_drop() is. If we made that change, then we'd still be doing only one check for TH_SYN, but the code would be a lot easier to comprehend. Mike "Silby" Silbersack