Date: Thu, 1 Jun 2017 15:11:18 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319433 - in head/sys/netinet: . tcp_stacks Message-ID: <201706011511.v51FBIYf087483@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706011511.v51FBIYf087483>