Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2009 17:02:10 +0000 (UTC)
From:      Zachary Loafman <zml@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r192912 - head/sys/netinet
Message-ID:  <200905271702.n4RH2A2O004832@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905271702.n4RH2A2O004832>