From ffa6de3259f36abf50b63932c6febd2860a221bf Mon Sep 17 00:00:00 2001 From: Song Guo Date: Wed, 15 Jul 2020 00:06:37 +0800 Subject: [PATCH] [OpenThread] ReceivePacket should use PBUF_LINK when allocating pbuf (#1591) --- .../GenericThreadStackManagerImpl_OpenThread_LwIP.ipp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.ipp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.ipp index b4a8a45448247b..334ce533d786ec 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.ipp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.ipp @@ -378,7 +378,7 @@ void GenericThreadStackManagerImpl_OpenThread_LwIP::ReceivePacket(otM struct netif * threadNetIf = ThreadStackMgrImpl().ThreadNetIf(); // Allocate an LwIP pbuf to hold the inbound packet. - pbuf = pbuf_alloc(PBUF_RAW, pktLen, PBUF_POOL); + pbuf = pbuf_alloc(PBUF_LINK, pktLen, PBUF_POOL); VerifyOrExit(pbuf != NULL, lwipErr = ERR_MEM); // Copy the packet data from the OpenThread message object to the pbuf.