Skip to content

Commit 2e27e43

Browse files
Veijo Pesonencmonr
authored andcommitted
LWIP PBUF_POOL_BUFSIZE increased to fit also IPv6 header
IPv6 header requires 20 more bytes compared to IPv4 header.
1 parent 80957eb commit 2e27e43

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

features/FEATURE_LWIP/lwip-interface/lwipopts.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@
150150
#ifdef MBED_CONF_LWIP_PBUF_POOL_BUFSIZE
151151
#undef PBUF_POOL_BUFSIZE
152152
#define PBUF_POOL_BUFSIZE MBED_CONF_LWIP_PBUF_POOL_BUFSIZE
153+
#else
154+
#if LWIP_IPV6
155+
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
156+
#else
157+
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+20+20+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN)
158+
#endif
153159
#endif
154160

155161
#ifdef MBED_CONF_LWIP_MEM_SIZE

0 commit comments

Comments
 (0)