Skip to content

Commit

Permalink
Merge branch 'bugfix/mdns_any_type_share_v3.1' into 'release/v3.1'
Browse files Browse the repository at this point in the history
mdns: Fix a portion of the queries are issued with the wildcard query type (backport v3.1)

See merge request idf/esp-idf!3008
  • Loading branch information
igrr committed Aug 14, 2018
2 parents 39dd71d + 1bbe953 commit 53509c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/mdns/mdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ static void _mdns_create_answer_from_parsed_packet(mdns_parsed_packet_t * parsed
}
if (service) {
if (q->type == MDNS_TYPE_PTR || q->type == MDNS_TYPE_ANY) {
if (q->type == MDNS_TYPE_PTR) {
if (q->type == MDNS_TYPE_PTR || !parsed_packet->probe) {
shared = true;
}
if (!_mdns_alloc_answer(&packet->answers, MDNS_TYPE_PTR, service->service, false, false)
Expand Down Expand Up @@ -2555,7 +2555,7 @@ void mdns_parse_packet(mdns_rx_packet_t * packet)
continue;
}

if (type == MDNS_TYPE_ANY) {
if (type == MDNS_TYPE_ANY && !_str_null_or_empty(name->host)) {
parsed_packet->probe = true;
}

Expand Down

0 comments on commit 53509c7

Please sign in to comment.