Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Dec 2016 12:27:35 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r310213 - stable/11/sys/netinet
Message-ID:  <201612181227.uBICRZQJ058272@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Dec 18 12:27:35 2016
New Revision: 310213
URL: https://svnweb.freebsd.org/changeset/base/310213

Log:
  MFC r309397:
  
  Fix the handling of  TCP FIN-segments in the CLOSED state
  
  When a TCP segment with the FIN bit set was received in the CLOSED state,
  a TCP RST-ACK-segment is sent. When computing SEG.ACK for this, the
  FIN counts as one byte. This accounting was missing and is fixed by this
  patch.
  
  Sponsored by:	Netflix, Inc.

Modified:
  stable/11/sys/netinet/tcp_input.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/tcp_input.c
==============================================================================
--- stable/11/sys/netinet/tcp_input.c	Sun Dec 18 12:23:48 2016	(r310212)
+++ stable/11/sys/netinet/tcp_input.c	Sun Dec 18 12:27:35 2016	(r310213)
@@ -3316,6 +3316,8 @@ tcp_dropwithreset(struct mbuf *m, struct
 	} else {
 		if (th->th_flags & TH_SYN)
 			tlen++;
+		if (th->th_flags & TH_FIN)
+			tlen++;
 		tcp_respond(tp, mtod(m, void *), th, m, th->th_seq+tlen,
 		    (tcp_seq)0, TH_RST|TH_ACK);
 	}



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