Skip to content

Commit 8dd5647

Browse files
committed
Increased allocated netbufs to handle DTLS handshakes
UDP based protocols such as DTLS may fragment large packets, resulting in many packets being sent at once. This can lead to significant/irrecoverable packet loss on systems that respond to packets slower than network transfers. Increasing MEMP_NUM_NETBUF to 8 allows lwip to handle a DTLS handshake successfully and should be more robust for similar protocols. DTLS handshake: https://tools.ietf.org/html/rfc4347#section-4.2.3
1 parent 70c8bcf commit 8dd5647

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/net/lwip/lwip/lwipopts.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@
5151
#define PBUF_POOL_SIZE 5
5252
#define MEMP_NUM_TCP_PCB_LISTEN 4
5353
#define MEMP_NUM_TCP_PCB 4
54+
#define MEMP_NUM_UDP_PCB 4
5455
#define MEMP_NUM_PBUF 8
56+
#define MEMP_NUM_NETBUF 8
5557

5658
#define TCP_QUEUE_OOSEQ 0
5759
#define TCP_OVERSIZE 0

0 commit comments

Comments
 (0)