From 07d3b3330d636d42baa1a07f34d9d50c2d37ab30 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Thu, 30 Jan 2020 20:42:15 +0100 Subject: [PATCH] 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 --- src/include/lwip/opt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index a6b50daa..8dcf0aa5 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -1545,7 +1545,7 @@ * TCP_MSS, IP header, and link header. */ #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 /**