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
Sponsored by:	Netflix, Inc.

(cherry picked from commit 1a61a673a3700c0ebdb0c5847b5923d0e3641f89)
This commit is contained in:
Peter Lei 2025-10-24 21:47:12 +02:00 • committed by Franco Fichtner
parent e9cca1aa23
commit 35ea0e428a

View file

@ -517,9 +517,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;
}
/*