lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] TCP window / timer problem


From: Kieran Mansley
Subject: Re: [lwip-users] TCP window / timer problem
Date: Thu, 10 Jun 2010 09:46:04 +0100

On Tue, 2010-06-08 at 20:38 +0100, Adam Fullerton wrote:
> Hi,
> 
> I am having problems getting TCP/IP to work. Attached is a Wireshark
> 1.2.6 capture of a TCP connection that exhibits the problem.
> 
> With reference to the Wireshark capture:
> The lwIP server device IP address is 192.168.243.2. The client
> (192.168.243.4) makes a TCP connection. Frame 6 shows the client
> sending the server the single character 0x0D. The lwIP server replies
> with the data in frame 7 and the client acknowledges in frame 8. The
> client sends the single character 0x0D again in frame 9. The server
> receives the data and calls the lwip_write socket API but the data
> never reaches the driver.

This looks very odd.  After the missing frame this is one subsequent
frame sent by lwIP (frame #11 in the capture) but this has a bogus
sequence number.  It's not entirely bogus though: in hex network byte
order it's 0x6f 0x19 0x02 0x0c while the previous (good) sequence number
was 0x00 0x00 0x19 0x6f - note the common 0x19 and 0x6f bytes.

I think some state in lwIP has got corrupted, such as the snd_nxt
sequence number and this has caused it to get confused about what it can
send.  This would prevent it sending TCP payload as it would think the
window was not big enough to cover these massively out-of-sequence
bytes.

What has caused the lwIP state to get corrupted though is a bit of a
mystery.  Often this sort of thing is down to two threads being active
in the stack at the same time; could you describe which lwIP API you're
using, how the application is threaded, and how the driver passes
received packets to lwIP?

Thanks

Kieran 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]