summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjch <jch@FreeBSD.org>2014-10-12 23:01:25 +0000
committerjch <jch@FreeBSD.org>2014-10-12 23:01:25 +0000
commita00ee110da93086f30db8e3df88a6e3297461c85 (patch)
treea9d7400ba9ce2c34ad5eb2b21e557ab9343f991f
parent9be68c3461b1961afeaf262633d350e5cabb2bee (diff)
downloadFreeBSD-src-a00ee110da93086f30db8e3df88a6e3297461c85.zip
FreeBSD-src-a00ee110da93086f30db8e3df88a6e3297461c85.tar.gz
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.
-rw-r--r--sys/netinet/tcp_usrreq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 22a160c..17efea4 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -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;
}
OpenPOWER on IntegriCloud