summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-11-03 07:53:59 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-11-03 07:53:59 +0000
commit4d6028967116fdefaa59d3d770edaeaf726104bf (patch)
tree0d1924e8b121a36cc6f74c048a18ad5a7c365ef1 /sys/netinet
parent0a99c650c170e193531d2ed03621eb36379383b1 (diff)
Notes
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_usrreq.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index cd86658cb5f8..4ea6c47b7358 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94
- * $Id: tcp_usrreq.c,v 1.16 1995/09/13 17:54:03 wollman Exp $
+ * $Id: tcp_usrreq.c,v 1.15.2.1 1995/09/15 09:01:55 davidg Exp $
*/
#include <sys/param.h>
@@ -674,8 +674,12 @@ tcp_usrclosed(tp)
tp->t_state = TCPS_LAST_ACK;
break;
}
- if (tp && tp->t_state >= TCPS_FIN_WAIT_2)
+ if (tp && tp->t_state >= TCPS_FIN_WAIT_2) {
soisdisconnected(tp->t_inpcb->inp_socket);
+ /* To prevent the connection hanging in FIN_WAIT_2 forever. */
+ if (tp->t_state == TCPS_FIN_WAIT_2)
+ tp->t_timer[TCPT_2MSL] = tcp_maxidle;
+ }
return (tp);
}