Merge branch 'bugfix/mdns_one_shot_multicast' into 'master'

mdns: Support for One-Shot mDNS queries

Closes IDFGH-5375

See merge request espressif/esp-idf!13943
This commit is contained in:
David Čermák 2021-06-24 18:47:06 +00:00
commit f601cb0fd7

View File

@ -1448,7 +1448,8 @@ static void _mdns_create_answer_from_parsed_packet(mdns_parsed_packet_t *parsed_
} }
#ifdef MDNS_REPEAT_QUERY_IN_RESPONSE #ifdef MDNS_REPEAT_QUERY_IN_RESPONSE
if (q->type == MDNS_TYPE_ANY || q->type == MDNS_TYPE_A || q->type == MDNS_TYPE_AAAA) { 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)); mdns_out_question_t * out_question = malloc(sizeof(mdns_out_question_t));
if (out_question == NULL) { if (out_question == NULL) {
HOOK_MALLOC_FAILED; HOOK_MALLOC_FAILED;