Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Aug 2016 17:48:54 +0000 (UTC)
From:      Hiren Panchasara <hiren@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r304855 - head/sys/netinet
Message-ID:  <201608261748.u7QHmsS2021309@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hiren
Date: Fri Aug 26 17:48:54 2016
New Revision: 304855
URL: https://svnweb.freebsd.org/changeset/base/304855

Log:
  Update TCPS_HAVERCVDFIN() macro to correctly include all states a connection
  can be in after receiving a FIN.
  
  FWIW, NetBSD has this change for quite some time.
  
  This has been tested at Netflix and Limelight in production traffic.
  
  Reported by:	Sam Kumar <samkumar99 at gmail.com> on transport@
  Reviewed by:	rrs
  MFC after:	4 weeks
  Sponsored by:	Limelight Networks
  Differential Revision:	 https://reviews.freebsd.org/D7475

Modified:
  head/sys/netinet/tcp_fsm.h

Modified: head/sys/netinet/tcp_fsm.h
==============================================================================
--- head/sys/netinet/tcp_fsm.h	Fri Aug 26 17:38:13 2016	(r304854)
+++ head/sys/netinet/tcp_fsm.h	Fri Aug 26 17:48:54 2016	(r304855)
@@ -73,7 +73,8 @@
 
 #define	TCPS_HAVERCVDSYN(s)	((s) >= TCPS_SYN_RECEIVED)
 #define	TCPS_HAVEESTABLISHED(s)	((s) >= TCPS_ESTABLISHED)
-#define	TCPS_HAVERCVDFIN(s)	((s) >= TCPS_TIME_WAIT)
+#define	TCPS_HAVERCVDFIN(s)	\
+    ((s) == TCPS_CLOSE_WAIT || ((s) >= TCPS_CLOSING && (s) != TCPS_FIN_WAIT_2))
 
 #ifdef	TCPOUTFLAGS
 /*



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