From f185c79ea632933d53369c0c940aaffa9daad59e Mon Sep 17 00:00:00 2001 From: Sakari Kapanen Date: Wed, 24 Oct 2018 09:10:56 -0600 Subject: [PATCH] nuttx/net/tcp/tcp_input.c: Fix recovery when ackseq > unackseq. The comment near this line says "reset the number of outstanding, unacknowledged bytes". However, the code actually resets the whole TCP connection. It was changed to the current form in commit f034d84ea1f with no explanation of the intent. Recover the line to what it was before that commit. --- net/tcp/tcp_input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c index 2371927484..5617865379 100644 --- a/net/tcp/tcp_input.c +++ b/net/tcp/tcp_input.c @@ -512,7 +512,8 @@ found: nwarn(" sndseq=%u unacked=%u unackseq=%u ackseq=%u\n", tcp_getsequence(conn->sndseq), conn->unacked, unackseq, ackseq); - goto reset; + + conn->unacked = 0; } }