The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH net] sctp: sm_statefuns: Fix zero window detection in T3 timeout handling
@ 2026-07-30  6:33 luoqing
  2026-08-04  1:55 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: luoqing @ 2026-07-30  6:33 UTC (permalink / raw)
  To: dsahern, idosch, davem, edumazet, kuba, pabeni
  Cc: horms, netdev, linux-kernel

From: Qing Luo <luoqing@kylinos.cn>

In sctp_sf_do_6_3_3_rtx(), the zero window detection was overly
restrictive, only starting the T5 shutdown guard timer when the
association was in SHUTDOWN_PENDING state. This caused premature
ABORTs when the receiver's rwnd was closed but the association was
still in ESTABLISHED state.

According to RFC 2960 Section 6.1, zero window probing is a normal
protocol behavior. When rwnd is 0, the sender can always have one
DATA chunk in flight to probe for a change in rwnd. Therefore, we
should give the receiver a chance to recover by starting the T5
timer regardless of the association's current state.

Fix this by removing the SHUTDOWN_PENDING state check, so that the
T5 timer is started whenever zero_window_announced is true.

Fixes: 8a0d19c5ed41 ("sctp: start t5 timer only when peer rwnd is 0 and local state is SHUTDOWN_PENDING")
Assisted-by: LLM # review
Signed-off-by: Qing Luo <luoqing@kylinos.cn>
---
 net/sctp/sm_statefuns.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 708fa07d5fff..b01db33bbc36 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -5842,8 +5842,7 @@ enum sctp_disposition sctp_sf_do_6_3_3_rtx(struct net *net,
 	SCTP_INC_STATS(net, SCTP_MIB_T3_RTX_EXPIREDS);
 
 	if (asoc->overall_error_count >= asoc->max_retrans) {
-		if (asoc->peer.zero_window_announced &&
-		    asoc->state == SCTP_STATE_SHUTDOWN_PENDING) {
+		if (asoc->peer.zero_window_announced) {
 			/*
 			 * We are here likely because the receiver had its rwnd
 			 * closed for a while and we have not been able to
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-04  1:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30  6:33 [PATCH net] sctp: sm_statefuns: Fix zero window detection in T3 timeout handling luoqing
2026-08-04  1:55 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox