lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Data corruption on packet fragmentation


From: Satz Klauer
Subject: [lwip-users] Data corruption on packet fragmentation
Date: Mon, 13 Jan 2014 21:31:20 +0100

Hi,

I notice a strange effect within my receive callback. There sometimes
corrupt data arrive in the middle of a 1460 bytes data block. I can
recognise this because the data block contains concatenated 7 byte
long structures that have to start with a specific byte - and in these
cases something completely different is contained within that byte.

It seems to happen always when the host side is not able to send a
full data packet at once. There the sending function tries to send()
packets with a size of about 400 kBytes. In case this is not possible
during a reasonable time something else is done and the remaining
bytes are tried to be sent some milliseconds later. Since the
host-side code is quite old and stable I think the sent data are OK
but there is a problem in my lwIP code.

When I increase the timeout value on host side so that the full 400k
Byte package is sent in one go, everything works fine.

So...any ideas what could be wrong? Currently I'm checking only
pbuf->len for the current data buffer length of a received pbuf and
deal with it. Is there some error flag or something like that I'd have
to check to recognise for invalid data buffers? Or something else like
that?

The err-parameter of the receive-callback is ERR_OK.

Thanks :-)



reply via email to

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