pbuf: avoid using multiple PBUF_POOL buffers for IPv6

Use 'PBUF_IP_HLEN+PBUF_TRANSPORT_HLEN' instead of '40' to calculate
PBUF_POOL_BUFSIZE (the size of each PBUF_POOL buffer) since the former
can be 60 when IPv6 is enabled.

See bug #56355

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
Simon Goldschmidt 2020-01-30 20:42:15 +01:00
parent 61349cf124
commit 07d3b3330d

View File

@ -1545,7 +1545,7 @@
* TCP_MSS, IP header, and link header. * TCP_MSS, IP header, and link header.
*/ */
#if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__ #if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+PBUF_IP_HLEN+PBUF_TRANSPORT_HLEN+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
#endif #endif
/** /**