Hi, I'm using a pretty old lwIP version and identified a problem with leaking MEMP_TCP_SEGs. Reading the lwIP mailing list achives I found at least two other threads regarding this issue but the only fixes in the latest code versions are the addition of a few asserts for the fault conditions.
Problem arises for me with TCP on bad WLAN links. The end result is that I get an incoming TCP packet through tcp_input(), (recv_flags & TF_CLOSED) is true, tcp_pcb_remove() is called. In turn tcp_pcb_purge() is called but at this point, (pcb->state == CLOSED) and the pcb->unsent and pcb->unacked queues are not freed. End result is that these segments are lost. The asserts added a couple of years ago can be found in tcp_pcb_remove() but I see no real cure for the problem. Analyzing the code I have a hard time to understand why the unsent and unacked queues aren't freed in tcp_pcb_purge() when in state CLOSED. Any input on this? Regards, PH -- Per-Henrik Lundblom email: [email protected] phone: +46 733 207126 webpage: www.whatever.nu _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
