diff --git a/components/mdns/Kconfig b/components/mdns/Kconfig index 3c55cd93..daea5377 100644 --- a/components/mdns/Kconfig +++ b/components/mdns/Kconfig @@ -17,5 +17,14 @@ config MDNS_MAX_SERVICES services to be open at the same time conserves memory. Specify the maximum amount of services here. The valid value is from 1 to 64. + +config MDNS_STACKSIZE + int "Max stack size of MDNS" + range 2048 4096 + default 4096 + depends on ENABLE_MDNS + help + The stacksize of the MDNS task that will be responsible for transmitting + and receiving MDNS packets. endmenu diff --git a/components/mdns/private_include/mdns_private.h b/components/mdns/private_include/mdns_private.h index 568c81b0..939b9e89 100644 --- a/components/mdns/private_include/mdns_private.h +++ b/components/mdns/private_include/mdns_private.h @@ -52,7 +52,7 @@ #define MDNS_ANSWER_SDPTR 0x80 #define MDNS_SERVICE_PORT 5353 // UDP port that the server runs on -#define MDNS_SERVICE_STACK_DEPTH 4096 // Stack size for the service thread +#define MDNS_SERVICE_STACK_DEPTH CONFIG_MDNS_STACKSIZE // Stack size for the service thread #define MDNS_PACKET_QUEUE_LEN 16 // Maximum packets that can be queued for parsing #define MDNS_ACTION_QUEUE_LEN 16 // Maximum actions pending to the server #define MDNS_TXT_MAX_LEN 1024 // Maximum string length of text data in TXT record