Fix SLIP RX linked list append.

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.

Merges https://github.com/espressif/esp-lwip/pull/25
This commit is contained in:
Rob Connolly
2020-12-02 13:18:31 +13:00
committed by David Čermák
parent 7285b846a2
commit 01d0ecff2d

View File

@ -497,7 +497,11 @@ slipif_rxbyte_enqueue(struct netif *netif, u8_t data)
if (priv->rxpackets != NULL) { if (priv->rxpackets != NULL) {
#if SLIP_RX_QUEUE #if SLIP_RX_QUEUE
/* queue multiple pbufs */ /* queue multiple pbufs */
#if ESP_LWIP
struct pbuf *q = priv->rxpackets;
#else
struct pbuf *q = p; struct pbuf *q = p;
#endif
while (q->next != NULL) { while (q->next != NULL) {
q = q->next; q = q->next;
} }