mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-30 02:37:31 +02:00
mdns: Add MDNS_STRICT_MODE config option
Strict mode was hardcoded in private header file, but it's useful for users to enable/disable it depending on the mdns library they are using. e.g. Avahi might not resolve the non-strict answers. * Original commit: espressif/esp-idf@0eee31546d
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
7a8329cb5c
commit
adc34309dc
@ -56,6 +56,17 @@ menu "mDNS"
|
|||||||
Configures timeout for adding a new mDNS service. Adding a service
|
Configures timeout for adding a new mDNS service. Adding a service
|
||||||
fails if could not be completed within this time.
|
fails if could not be completed within this time.
|
||||||
|
|
||||||
|
config MDNS_STRICT_MODE
|
||||||
|
bool "mDNS strict mode"
|
||||||
|
default "n"
|
||||||
|
help
|
||||||
|
Configures strict mode. Set this to 1 for the mDNS library to strictly follow the RFC6762:
|
||||||
|
Currently the only strict feature: Do not repeat original questions in response packets
|
||||||
|
(defined in RFC6762 sec. 6).
|
||||||
|
Default configuration is 0, i.e. non-strict mode, since some implementations,
|
||||||
|
such as lwIP mdns resolver (used by standard POSIX API like getaddrinfo, gethostbyname)
|
||||||
|
could not correctly resolve advertised names.
|
||||||
|
|
||||||
config MDNS_TIMER_PERIOD_MS
|
config MDNS_TIMER_PERIOD_MS
|
||||||
int "mDNS timer period (ms)"
|
int "mDNS timer period (ms)"
|
||||||
range 10 10000
|
range 10 10000
|
||||||
|
@ -32,7 +32,11 @@
|
|||||||
* such as lwIP mdns resolver (used by standard POSIX API like getaddrinfo, gethostbyname)
|
* such as lwIP mdns resolver (used by standard POSIX API like getaddrinfo, gethostbyname)
|
||||||
* could not correctly resolve advertised names.
|
* could not correctly resolve advertised names.
|
||||||
*/
|
*/
|
||||||
|
#ifndef CONFIG_MDNS_STRICT_MODE
|
||||||
#define MDNS_STRICT_MODE 0
|
#define MDNS_STRICT_MODE 0
|
||||||
|
#else
|
||||||
|
#define MDNS_STRICT_MODE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !MDNS_STRICT_MODE
|
#if !MDNS_STRICT_MODE
|
||||||
/* mDNS responders sometimes repeat queries in responses
|
/* mDNS responders sometimes repeat queries in responses
|
||||||
|
Reference in New Issue
Block a user