From 70fdf906e5ad4fb48bd363275d72ec9fa1c020c1 Mon Sep 17 00:00:00 2001 From: Rob Connolly Date: Wed, 2 Dec 2020 13:18:31 +1300 Subject: [PATCH] slip: 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. Picked from espressif/esp-lwip@01d0ecff Ref IDF-4847 --- src/netif/slipif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netif/slipif.c b/src/netif/slipif.c index 9b175dc3..773f1103 100644 --- a/src/netif/slipif.c +++ b/src/netif/slipif.c @@ -497,7 +497,7 @@ slipif_rxbyte_enqueue(struct netif *netif, u8_t data) if (priv->rxpackets != NULL) { #if SLIP_RX_QUEUE /* queue multiple pbufs */ - struct pbuf *q = p; + struct pbuf *q = priv->rxpackets; while (q->next != NULL) { q = q->next; }