Skip to content

Commit d024b03

Browse files
ricardgbclaude
andcommitted
netutils/mdns: raise responder stack size default to 8KiB
CONFIG_NETUTILS_MDNS_STACKSIZE defaulted to DEFAULT_TASK_STACKSIZE, which resolves to as little as 2KiB on some targets. The bundled mjansson responder uses a deeper stack than that (DNS record parsing with name decompression, plus the send/receive buffers) and overflows on startup, taking the board down with a hardfault before it answers a single query. Default to 8KiB, the value that reliably runs the responder, and correct the help text, which previously claimed a 4KiB default that did not match DEFAULT_TASK_STACKSIZE. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Ricard Rosson <ricard@groundbits.com>
1 parent 27c466a commit d024b03

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

netutils/mdns/Kconfig

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,15 @@ config NETUTILS_MDNS_PRIORITY
5151

5252
config NETUTILS_MDNS_STACKSIZE
5353
int "mDNS stack size"
54-
default DEFAULT_TASK_STACKSIZE
54+
default 8192
5555
---help---
56-
The default (4KiB) is adequate for simple networks but this will
57-
most likely need to be increased if there are many network devices
58-
attached that could send queries.
56+
Stack size for the mDNS responder task. The bundled mjansson
57+
responder uses a fairly deep stack (record parsing with name
58+
decompression plus the send/receive buffers), so the previous
59+
default of DEFAULT_TASK_STACKSIZE overflows and hardfaults on
60+
startup on targets where that resolves to a small value (e.g.
61+
2KiB). 8KiB is adequate for typical networks; increase it further
62+
if many devices on the network send queries.
5963

6064
config NETUTILS_MDNS_VERBOSE
6165
bool "Enable verbose printf output from built-in mdns demo"

0 commit comments

Comments
 (0)