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

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to