This is an automated email from the ASF dual-hosted git repository.

kasjer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 3b540b6729fc65162414229d98a7728f09197f80
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Tue Oct 13 12:34:35 2026 +0200

    net/ip/lwip_mn: Make number of UDP PCBs configurable
    
    MEMP_NUM_UDP_PCB was fixed at 4.  An application using DHCP client,
    inet_def_service (3 UDP sockets) and a DHCP server on a second
    interface needs more.  Add LWIP_NUM_UDP_PCB syscfg with the old
    value as default.
    
    Assisted-by: Claude:claude-opus-5-5
    Signed-off-by: Jerzy Kasenberg <[email protected]>
---
 net/ip/lwip_mn/lwipopts/include/lwipopts.h | 2 +-
 net/ip/lwip_mn/lwipopts/syscfg.yml         | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/net/ip/lwip_mn/lwipopts/include/lwipopts.h 
b/net/ip/lwip_mn/lwipopts/include/lwipopts.h
index 0d285dac8..ea1d14dec 100644
--- a/net/ip/lwip_mn/lwipopts/include/lwipopts.h
+++ b/net/ip/lwip_mn/lwipopts/include/lwipopts.h
@@ -86,7 +86,7 @@ extern "C" {
 #define MEMP_NUM_PBUF                   20
 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
    per active UDP "connection". */
-#define MEMP_NUM_UDP_PCB                4
+#define MEMP_NUM_UDP_PCB                MYNEWT_VAL_LWIP_NUM_UDP_PCB
 
 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
    connections. */
diff --git a/net/ip/lwip_mn/lwipopts/syscfg.yml 
b/net/ip/lwip_mn/lwipopts/syscfg.yml
index e18898bbc..465aecdd0 100644
--- a/net/ip/lwip_mn/lwipopts/syscfg.yml
+++ b/net/ip/lwip_mn/lwipopts/syscfg.yml
@@ -42,6 +42,11 @@ syscfg.defs:
     LWIP_IPV6:
         description: Enable IPV6 support
         value: 1
+    LWIP_NUM_UDP_PCB:
+        description: >
+            Number of UDP protocol control blocks, one per active UDP
+            socket (DHCP client and DHCP server use one each).
+        value: 4
 
 syscfg.restrictions:
     # As long as MEM_LIBC_MALLOC is 1 this restriction applies

Reply via email to