aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Lei <peterlei@netflix.com>2025-10-24 19:47:12 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2025-10-24 19:47:12 +0000
commit1a61a673a3700c0ebdb0c5847b5923d0e3641f89 (patch)
treed293f2c063de41b97de824d6bbcd4edd8202739a
parent04c2642406815729781e7eb219a5438583fff27f (diff)
tcp: save progress timeout cause in connection end status
TCP stats are currently incremented for the persist and progress timeout conditions, but only the persist cause was saved in the connection end info status, which in turn is logged in the blackbox "connection end" event. Reviewed by: tuexen MFC after: 3 days Sponsored by: Netflix, Inc.
-rw-r--r--sys/netinet/tcp_timer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 3b9fe7a317b0..57c57666fa3a 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -513,9 +513,12 @@ tcp_timer_persist(struct tcpcb *tp)
if (progdrop || (tp->t_rxtshift >= V_tcp_retries &&
(ticks - tp->t_rcvtime >= tcp_maxpersistidle ||
ticks - tp->t_rcvtime >= TCP_REXMTVAL(tp) * tcp_totbackoff))) {
- if (!progdrop)
+ if (progdrop) {
+ tcp_log_end_status(tp, TCP_EI_STATUS_PROGRESS);
+ } else {
TCPSTAT_INC(tcps_persistdrop);
- tcp_log_end_status(tp, TCP_EI_STATUS_PERSIST_MAX);
+ tcp_log_end_status(tp, TCP_EI_STATUS_PERSIST_MAX);
+ }
goto dropit;
}
/*