mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-25 08:17:28 +02:00
fix(mdns): Remove strict mode as it's invalid
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."
This commit is contained in:
@ -1728,7 +1728,6 @@ static void _mdns_create_answer_from_parsed_packet(mdns_parsed_packet_t *parsed_
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef MDNS_REPEAT_QUERY_IN_RESPONSE
|
||||
if (parsed_packet->src_port != MDNS_SERVICE_PORT && // Repeat the queries only for "One-Shot mDNS queries"
|
||||
(q->type == MDNS_TYPE_ANY || q->type == MDNS_TYPE_A || q->type == MDNS_TYPE_AAAA)) {
|
||||
mdns_out_question_t *out_question = malloc(sizeof(mdns_out_question_t));
|
||||
@ -1751,7 +1750,6 @@ static void _mdns_create_answer_from_parsed_packet(mdns_parsed_packet_t *parsed_
|
||||
out_question->own_dynamic_memory = true;
|
||||
queueToEnd(mdns_out_question_t, packet->questions, out_question);
|
||||
}
|
||||
#endif // MDNS_REPEAT_QUERY_IN_RESPONSE
|
||||
if (q->unicast) {
|
||||
unicast = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user