From owner-svn-src-head@FreeBSD.ORG Wed May 27 17:02:10 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BB21106574C; Wed, 27 May 2009 17:02:10 +0000 (UTC) (envelope-from zml@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 665278FC14; Wed, 27 May 2009 17:02:10 +0000 (UTC) (envelope-from zml@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4RH2AL8004833; Wed, 27 May 2009 17:02:10 GMT (envelope-from zml@svn.freebsd.org) Received: (from zml@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4RH2A2O004832; Wed, 27 May 2009 17:02:10 GMT (envelope-from zml@svn.freebsd.org) Message-Id: <200905271702.n4RH2A2O004832@svn.freebsd.org> From: Zachary Loafman Date: Wed, 27 May 2009 17:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192912 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 17:02:12 -0000 Author: zml Date: Wed May 27 17:02:10 2009 New Revision: 192912 URL: http://svn.freebsd.org/changeset/base/192912 Log: Correct handling of SYN packets that are to the left of the current window of an ESTABLISHED connection. Reviewed by: net@, gnn Approved by: dfr (mentor) Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Wed May 27 17:01:59 2009 (r192911) +++ head/sys/netinet/tcp_input.c Wed May 27 17:02:10 2009 (r192912) @@ -1818,7 +1818,11 @@ tcp_do_segment(struct mbuf *m, struct tc todrop = tp->rcv_nxt - th->th_seq; if (todrop > 0) { - if (thflags & TH_SYN) { + /* + * If this is a duplicate SYN for our current connection, + * advance over it and pretend and it's not a SYN. + */ + if (thflags & TH_SYN && th->th_seq == tp->irs) { thflags &= ~TH_SYN; th->th_seq++; if (th->th_urp > 1)