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: Tim Cussins
Subject: Re: [lwip-users] Server TCP RST prevents client code from draining the receive buffer.
Date: Thu, 19 Jan 2017 09:50:46 +0000

Hi Simon,

Thanks for the quick reply!

On Wed, Jan 18, 2017, at 08:36 PM, address@hidden wrote:
> 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!]

Yup, the server sends RST in separate segment.

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

Guilty as charged :)

> > 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 :-)

Awesome!

> 
> Simon
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

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