svn commit: r273014 - head/sys/netinet

Julien Charbon jch at FreeBSD.org
Sun Oct 12 23:01:26 UTC 2014


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;
 	}


More information about the svn-src-head mailing list