From: luoqing <l1138897701@163.com>
To: dsahern@kernel.org, idosch@nvidia.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: horms@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net] sctp: sm_statefuns: Fix zero window detection in T3 timeout handling
Date: Thu, 30 Jul 2026 14:33:44 +0800 [thread overview]
Message-ID: <20260730063344.770679-1-l1138897701@163.com> (raw)
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
next reply other threads:[~2026-07-30 6:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 6:33 luoqing [this message]
2026-08-04 1:55 ` [PATCH net] sctp: sm_statefuns: Fix zero window detection in T3 timeout handling Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260730063344.770679-1-l1138897701@163.com \
--to=l1138897701@163.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox