summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1996-01-31 05:37:29 +0000
committermycroft <mycroft@NetBSD.org>1996-01-31 05:37:29 +0000
commita4e1bceb84388e4e15af2ccd3349acdb6fac0901 (patch)
tree84b78f9de4e01eefab004efd40b7cbce83d6d12a /sys/netinet/tcp_usrreq.c
parent59d1cce3ae16afc21939f08a19e6dc4f98f6e325 (diff)
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.
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c7
1 files changed, 5 insertions, 2 deletions
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);
}