Fix an error the TCP/IP received sequence number counting

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4416 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-02-23 15:53:27 +00:00
parent 0362fd4c22
commit 112e4f55ba
6 changed files with 108 additions and 69 deletions
+9
View File
@@ -2484,3 +2484,12 @@
the accecpt() and connect() logic. Contributed by Max Nekludov.
* net/recvfrom.c and net/uip/uip_tcpcallback.c: Fix a leak in the TCP
read-ahead logic. This is a *critical* bug fix!
* net/uip/uip_tcpinput.c: Correct an error in the TCP stack. It was
incrementing the received sequence number BEFORE determining if the
incoming data could be handled. If the data was dropped (usually because
there is insufficient buffering space), then no ACK will be sent and the
sequence number will be wrong. The end consequence of the bad sequence
number was that the when the dropped packet was re-transmitted, it was
was ignored because its sequence number looked wrong. Fix was, obviously,
to only increment the recevied sequence number if the TCP data was
accepted.