lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Server TCP RST prevents client code from draining the r


From: address@hidden
Subject: Re: [lwip-users] Server TCP RST prevents client code from draining the receive buffer.
Date: Wed, 18 Jan 2017 21:36:50 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

Tim Cussins wrote:
We've encountered a couple of interesting http servers in the wild that
redirect, then send a TCP RST immediately.
[..]
In our case, the data for the redirect appears to make it into LWIP, but
the subsequent RST causes the pcb to be discarded before we have an
opportunity to read it. See tcp_in.c:377
That code doesn't mean you can't read the data.
[I strongly doubt that a server sends data *and* RST in one segment!]

Given that, I suspect you are using netconn or socket API.

Any thoughts on the cleanest modification to LWIP that would allow the
receive buffer to be drained?

Yes: task #13922 (Remove fatal error handling) has to be done first. "Fatal error handling" currently prevents reads after a "fatal" error (e.g. RST received). Technically, this is not required
and you just provided a real-life reason to not do so.

You can expect a fix for 2.0.2 :-)

Simon



reply via email to

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