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
This commit is contained in:
Rob Connolly
2020-12-02 13:18:31 +13:00
committed by David Cermak
parent 9d6459ec2d
commit 84e0273282
+1 -1
View File
@@ -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;
}