diff options
author | jch <jch@FreeBSD.org> | 2016-07-27 06:31:40 +0000 |
---|---|---|
committer | jch <jch@FreeBSD.org> | 2016-07-27 06:31:40 +0000 |
commit | 541060fe206ad7ae572e2e335831cbd0193f3c96 (patch) | |
tree | 7e84c24560da3518f004edd53aa881282dde8235 /sys/netinet/tcp_usrreq.c | |
parent | c9c19c9c8410b1dcbd760d5382a6071ed8396652 (diff) | |
download | FreeBSD-src-541060fe206ad7ae572e2e335831cbd0193f3c96.zip FreeBSD-src-541060fe206ad7ae572e2e335831cbd0193f3c96.tar.gz |
MFC r273014:
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.
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 8d7e9a0..9955468 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -625,7 +625,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; } |