Page MenuHomeFreeBSD

D37112.diff
No OneTemporary

D37112.diff

diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -654,6 +654,8 @@
goto out;
}
tp = intotcpcb(inp);
+ if (tp->t_state == TCPS_TIME_WAIT)
+ goto out;
tcp_disconnect(tp);
out:
TCP_PROBE2(debug__user, tp, PRU_DISCONNECT);
@@ -1248,14 +1250,16 @@
("tcp_usr_close: inp_socket == NULL"));
/*
- * If we still have full TCP state, and we're not dropped, initiate
+ * If we are still connected and we're not dropped, initiate
* a disconnect.
*/
if (!(inp->inp_flags & INP_DROPPED)) {
tp = intotcpcb(inp);
- tp->t_flags |= TF_CLOSED;
- tcp_disconnect(tp);
- TCP_PROBE2(debug__user, tp, PRU_CLOSE);
+ if (tp->t_state != TCPS_TIME_WAIT) {
+ tp->t_flags |= TF_CLOSED;
+ tcp_disconnect(tp);
+ TCP_PROBE2(debug__user, tp, PRU_CLOSE);
+ }
}
if (!(inp->inp_flags & INP_DROPPED)) {
soref(so);

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 1, 8:19 AM (21 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13239896
Default Alt Text
D37112.diff (910 B)

Event Timeline