Closed webworxshop closed 3 years ago
Thanks for your contribution.
@webworxshop Thanks very much for posting this fix! Interesting that this bug seems to be present in the lwip upstream, too.
Possibly, the reason why this bug was never discovered, might be, the esp-idf's port of slip input processing. I think if we moved the slipif_process_rxqueue()
few lines up, we might never have seen the issue, as the rx-queue would be continuously processing the pbuf's before they start to queue.
Anyway, this is should be fixed here, as you propose.
@webworxshop Thanks again for the fix, merged as https://github.com/espressif/esp-lwip/commit/01d0ecff2d5de8b7b7f0d32664a5baa71e941281
Append to the linked list of pbuf objects was broken so that the second (and subsequent) packets received in a SLIP transaction would be appended to themselves and consequently lost.
This resulted in these packets being dropped and the system suffering extreme memory leakage.
/cc @ryankurte