Strict mode was introduced to support "one-shot" queries (described in
RFC6762/sec5.1) that are sent by lwip or dig. It was incorrectly assumed
that responding to such queries violates the spec, as we have to repeat
queries in responces, which is forbidden in RFC6762/sec6. It is however
required to repeat query fields according to the Section 6.7. Legacy
Unicast Responses: "it MUST repeat the query ID and the question
given in the query message."
The bit field in the header flags does not match its intended order on
little endian machines. The PR removes the bit field and uses bit
operations instead.
This commit removes the usage of all legacy FreeRTOS data types that
are exposed via configENABLE_BACKWARD_COMPATIBILITY. Legacy types can
still be used by enabling CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY.
* Original commit: espressif/esp-idf@57fd78f5ba
* Reduced number of include paths
* Abstract the internals of mdns packet (specifics defined in
mdns_networking.c)
* Use ESP_IP addresses instead of lwip addresses
* Original commit: espressif/esp-idf@54e329444a
The repeated query will be copied in the next event loop while the
memory is freed instantly. Delay the free to fix this issue.
* Original commit: espressif/esp-idf@5f244c86f2
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
By default adds original queries to responses in order to be resolved by some resolvers, such as lwIP mdns library. This functionality however is discouraged by the RFC6762, so it could be disabled in menuconfig if MDNS_STRICT_MODE configured
Closes https://github.com/espressif/esp-idf/issues/5521
* Original commit: espressif/esp-idf@bcfa36db8f
In case of invalid name entry, only this entry is invalidated and parsing continues as other query entries could contain questions to be responded to
* Original commit: espressif/esp-idf@4bd4c7caf3
packets scheduled to transmit are pushed to action queue and removed from tx_queue_head structure, which is searched for all remaining services and while service is removed, then service questions/asnwers are also removed from this structure. This update fixes possible crash when packet is pushed to action queue, and when service is removed, its answers are removed from tx_queue_head, but not from action queue. this could lead to a crash when the packet is poped from action queue containing questions/answers to already removed (freed) service
Closes IDF-504
* Original commit: espressif/esp-idf@67051a286b
mdns_search_once_t::lock is used to synchronize tasks (taken by one
task and given by the other) so it should not be a mutex.
Convert to semaphore, and rename to indicate its purpose.
* Original commit: espressif/esp-idf@eef0b5090a
Allocation was happening later, causing possible use of stack variables
of caller function, which could be invalid.
Signed-off-by: Piyush Shah <piyush@espressif.com>
* Original commit: espressif/esp-idf@e5e2702ca3