Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Oct 2014 23:01:25 +0000 (UTC)
From:      Julien Charbon <jch@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273014 - head/sys/netinet
Message-ID:  <201410122301.s9CN1Pxr037060@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jch
Date: Sun Oct 12 23:01:25 2014
New Revision: 273014
URL: https://svnweb.freebsd.org/changeset/base/273014

Log:
  A connection in TIME_WAIT state before calling close() actually did not
  received any RST packet.  Do not set error to ECONNRESET in this case.
  
  Differential Revision:	https://reviews.freebsd.org/D879
  Reviewed by:		rpaulo, adrian
  Approved by:		jhb (mentor)
  Sponsored by:		Verisign, Inc.

Modified:
  head/sys/netinet/tcp_usrreq.c

Modified: head/sys/netinet/tcp_usrreq.c
==============================================================================
--- head/sys/netinet/tcp_usrreq.c	Sun Oct 12 22:11:28 2014	(r273013)
+++ head/sys/netinet/tcp_usrreq.c	Sun Oct 12 23:01:25 2014	(r273014)
@@ -592,7 +592,9 @@ tcp_usr_disconnect(struct socket *so)
 	inp = sotoinpcb(so);
 	KASSERT(inp != NULL, ("tcp_usr_disconnect: inp == NULL"));
 	INP_WLOCK(inp);
-	if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) {
+	if (inp->inp_flags & INP_TIMEWAIT)
+		goto out;
+	if (inp->inp_flags & INP_DROPPED) {
 		error = ECONNRESET;
 		goto out;
 	}



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