svn commit: r319433 - in head/sys/netinet: . tcp_stacks

Michael Tuexen tuexen at FreeBSD.org
Thu Jun 1 15:11:19 UTC 2017


Author: tuexen
Date: Thu Jun  1 15:11:18 2017
New Revision: 319433
URL: https://svnweb.freebsd.org/changeset/base/319433

Log:
  Improve comments to describe what the code does.
  
  Reported by:		jtl
  Sponsored by:		Netflix, Inc.

Modified:
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_stacks/fastpath.c

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Thu Jun  1 15:03:43 2017	(r319432)
+++ head/sys/netinet/tcp_input.c	Thu Jun  1 15:11:18 2017	(r319433)
@@ -2011,8 +2011,10 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
 
 	/*
 	 * If the state is SYN_SENT:
-	 *	if seg contains a RST, then drop the connection.
-	 *	if seg does not contain SYN, then drop it.
+	 *	if seg contains a RST with valid ACK (SEQ.ACK has already
+	 *	    been verified), then drop the connection.
+	 *	if seg contains a RST without an ACK, drop the seg.
+	 *	if seg does not contain SYN, then drop the seg.
 	 * Otherwise this is an acceptable SYN segment
 	 *	initialize tp->rcv_nxt and tp->irs
 	 *	if seg contains ack then advance tp->snd_una

Modified: head/sys/netinet/tcp_stacks/fastpath.c
==============================================================================
--- head/sys/netinet/tcp_stacks/fastpath.c	Thu Jun  1 15:03:43 2017	(r319432)
+++ head/sys/netinet/tcp_stacks/fastpath.c	Thu Jun  1 15:11:18 2017	(r319433)
@@ -497,8 +497,10 @@ tcp_do_slowpath(struct mbuf *m, struct tcphdr *th, str
 
 	/*
 	 * If the state is SYN_SENT:
-	 *	if seg contains a RST, then drop the connection.
-	 *	if seg does not contain SYN, then drop it.
+	 *	if seg contains a RST with valid ACK (SEQ.ACK has already
+	 *	    been verified), then drop the connection.
+	 *	if seg contains a RST without an ACK, drop the seg.
+	 *	if seg does not contain SYN, then drop the seg.
 	 * Otherwise this is an acceptable SYN segment
 	 *	initialize tp->rcv_nxt and tp->irs
 	 *	if seg contains ack then advance tp->snd_una


More information about the svn-src-head mailing list