tcp_input: Add condition to check sndseq and ackseq equality

When triggering TCP retransmission through a timer, conn->unacked_q will save more packets, which may result in sndseq being equal to ackseq. Previous implementations may cause conn->nrtx to not be cleared, leading to an increase in conn->rto errors and a longer timer time

Signed-off-by: wangchen <wangchen41@xiaomi.com>
This commit is contained in:
wangchen
2025-07-04 10:40:08 +08:00
committed by Xiang Xiao
parent eae67ef9a5
commit 6cf4c95517
+1 -1
View File
@@ -1070,7 +1070,7 @@ found:
*/
uint32_t sndseq = tcp_getsequence(conn->sndseq);
if (TCP_SEQ_LT(sndseq, ackseq))
if (TCP_SEQ_LTE(sndseq, ackseq))
{
ninfo("sndseq: %08" PRIx32 "->%08" PRIx32
" unackseq: %08" PRIx32 " new tx_unacked: %" PRIu32 "\n",