svn commit: r258821 - head/sys/netinet
Eitan Adler
eadler at FreeBSD.org
Mon Dec 2 03:11:26 UTC 2013
Author: eadler
Date: Mon Dec 2 03:11:25 2013
New Revision: 258821
URL: http://svnweb.freebsd.org/changeset/base/258821
Log:
In a situation where:
- The remote host sends a FIN
- in an ACK for a sequence number for which an ACK has already
been received
- There is still unacked data on route to the remote host
- The packet does not contain a window update
The packet may be dropped without processing the FIN flag.
PR: kern/99188
Submitted by: Staffan Ulfberg <staffan at ulfberg.se>
Discussed with: andre
MFC after: never
Modified:
head/sys/netinet/tcp_input.c
Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c Mon Dec 2 02:33:03 2013 (r258820)
+++ head/sys/netinet/tcp_input.c Mon Dec 2 03:11:25 2013 (r258821)
@@ -2429,13 +2429,15 @@ tcp_do_segment(struct mbuf *m, struct tc
hhook_run_tcp_est_in(tp, th, &to);
if (SEQ_LEQ(th->th_ack, tp->snd_una)) {
- if (tlen == 0 && tiwin == tp->snd_wnd) {
+ if (tlen == 0 && tiwin == tp->snd_wnd &&
+ !(thflags & TH_FIN)) {
TCPSTAT_INC(tcps_rcvdupack);
/*
* If we have outstanding data (other than
* a window probe), this is a completely
* duplicate ack (ie, window info didn't
- * change), the ack is the biggest we've
+ * change and FIN isn't set),
+ * the ack is the biggest we've
* seen and we've seen exactly our rexmt
* threshhold of them, assume a packet
* has been dropped and retransmit it.
More information about the svn-src-head
mailing list