svn commit: r310213 - stable/11/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sun Dec 18 12:27:36 UTC 2016
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);
}
More information about the svn-src-all
mailing list