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.
This commit is contained in:
parent
59d1cce3ae
commit
a4e1bceb84
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user