Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F97608029
D37112.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
910 B
Referenced Files
None
Subscribers
None
D37112.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D37112: tcp: Don't try to disconnect a socket multiple times.
Attached
Detach File
Event Timeline
Log In to Comment