Hi Simon, Thanks for the quick reply!
On Wed, Jan 18, 2017, at 08:36 PM, [email protected] 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 > [email protected] > https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
