From owner-svn-src-stable@freebsd.org Sun Dec 18 12:27:36 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7268C71D48; Sun, 18 Dec 2016 12:27:36 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 866E51EF0; Sun, 18 Dec 2016 12:27:36 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBICRZOY058273; Sun, 18 Dec 2016 12:27:35 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBICRZQJ058272; Sun, 18 Dec 2016 12:27:35 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201612181227.uBICRZQJ058272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 18 Dec 2016 12:27:35 +0000 (UTC) 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 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2016 12:27:36 -0000 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); }