Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Dec 2013 03:11:26 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r258821 - head/sys/netinet
Message-ID:  <201312020311.rB23BQIv078908@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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.



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