Skip to content

Commit 5a81eae

Browse files
mdns: Support for One-Shot mDNS queries
* Original commit: espressif/esp-idf@f167238
1 parent 2ddaee2 commit 5a81eae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/mdns/mdns.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,8 @@ static void _mdns_create_answer_from_parsed_packet(mdns_parsed_packet_t *parsed_
14481448
}
14491449

14501450
#ifdef MDNS_REPEAT_QUERY_IN_RESPONSE
1451-
if (q->type == MDNS_TYPE_ANY || q->type == MDNS_TYPE_A || q->type == MDNS_TYPE_AAAA) {
1451+
if (parsed_packet->src_port != MDNS_SERVICE_PORT && // Repeat the queries only for "One-Shot mDNS queries"
1452+
(q->type == MDNS_TYPE_ANY || q->type == MDNS_TYPE_A || q->type == MDNS_TYPE_AAAA)) {
14521453
mdns_out_question_t * out_question = malloc(sizeof(mdns_out_question_t));
14531454
if (out_question == NULL) {
14541455
HOOK_MALLOC_FAILED;

0 commit comments

Comments
 (0)