Skip to content

Commit 1bbe953

Browse files
lhespressprojectgus
authored andcommitted
mdns: Fix a portion of the queries are issued with the wildcard query type
1 parent 39dd71d commit 1bbe953

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/mdns/mdns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ static void _mdns_create_answer_from_parsed_packet(mdns_parsed_packet_t * parsed
11801180
}
11811181
if (service) {
11821182
if (q->type == MDNS_TYPE_PTR || q->type == MDNS_TYPE_ANY) {
1183-
if (q->type == MDNS_TYPE_PTR) {
1183+
if (q->type == MDNS_TYPE_PTR || !parsed_packet->probe) {
11841184
shared = true;
11851185
}
11861186
if (!_mdns_alloc_answer(&packet->answers, MDNS_TYPE_PTR, service->service, false, false)
@@ -2555,7 +2555,7 @@ void mdns_parse_packet(mdns_rx_packet_t * packet)
25552555
continue;
25562556
}
25572557

2558-
if (type == MDNS_TYPE_ANY) {
2558+
if (type == MDNS_TYPE_ANY && !_str_null_or_empty(name->host)) {
25592559
parsed_packet->probe = true;
25602560
}
25612561

0 commit comments

Comments
 (0)