aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2026-04-12 18:33:07 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2026-04-12 18:33:07 +0000
commit40dbb06fa73cac37d57563c07e55efd0cabbd488 (patch)
treec11f41fa7c8baac00322576c2a72446f3fbf2eb7 /sys/netinet/tcp_subr.c
parentce283e115b023514a8886c1c1f1c68df7cd5e9a9 (diff)
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 43c430708926..443af020848f 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -2551,10 +2551,11 @@ tcp_close(struct tcpcb *tp)
tcp_timer_stop(tp);
if (tp->t_fb->tfb_tcp_timer_stop_all != NULL)
tp->t_fb->tfb_tcp_timer_stop_all(tp);
- in_pcbdrop(inp);
+ in_pcbdisconnect(inp);
TCPSTAT_INC(tcps_closed);
if (tp->t_state != TCPS_CLOSED)
tcp_state_change(tp, TCPS_CLOSED);
+ tp->t_flags |= TF_DISCONNECTED;
KASSERT(inp->inp_socket != NULL, ("tcp_close: inp_socket NULL"));
tcp_free_sackholes(tp);
soisdisconnected(so);