Skip to content

Commit

Permalink
Merge branch 'bugfix/mdns_one_shot_multicast' into 'master'
Browse files Browse the repository at this point in the history
mdns: Support for One-Shot mDNS queries

Closes IDFGH-5375

See merge request espressif/esp-idf!13943
  • Loading branch information
david-cermak committed Jun 24, 2021
2 parents 90a2a15 + f167238 commit f601cb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/mdns/mdns.c
Expand Up @@ -1448,7 +1448,8 @@ static void _mdns_create_answer_from_parsed_packet(mdns_parsed_packet_t *parsed_
}

#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));
if (out_question == NULL) {
HOOK_MALLOC_FAILED;
Expand Down

0 comments on commit f601cb0

Please sign in to comment.