From a4e1bceb84388e4e15af2ccd3349acdb6fac0901 Mon Sep 17 00:00:00 2001 From: mycroft Date: Wed, 31 Jan 1996 05:37:29 +0000 Subject: If we close from FIN_WAIT_2 state, make sure we don't leave the socket around forever if we don't get a final FIN. From Arne Juul, PR 1659. --- sys/netinet/tcp_usrreq.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/netinet') diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index c0cda168fa1..efd5e1fe61c 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_usrreq.c,v 1.17 1995/09/30 07:02:05 thorpej Exp $ */ +/* $NetBSD: tcp_usrreq.c,v 1.18 1996/01/31 05:37:29 mycroft Exp $ */ /* * Copyright (c) 1982, 1986, 1988, 1993 @@ -521,8 +521,11 @@ 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); + if (tp->t_state == TCPS_FIN_WAIT_2) + tp->t_timer[TCPT_2MSL] = tcp_maxidle; + } return (tp); } -- cgit