Skip to content

Commit

Permalink
mdns: Fix the resolver to correctly parse it's own non-strict answers
Browse files Browse the repository at this point in the history
The resolver was able to respond correctly, but would also resolve its
own queries and cause issues with BCT 1.5.2, specifically
* MULTIPLE QUESTIONS - DUPLICATE SUPPRESSION
* MULTIPLE QUESTIONS - DISTRIBUTED DUPLICATE SUPPRESSION
tests failed.
  • Loading branch information
david-cermak authored and espressif-bot committed Apr 12, 2021
1 parent 0eee315 commit b649603
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions components/mdns/mdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -2815,13 +2815,12 @@ void mdns_parse_packet(mdns_rx_packet_t * packet)

if (parsed_packet->discovery && _mdns_name_is_discovery(name, type)) {
discovery = true;
} else {
if (!name->sub && _mdns_name_is_ours(name)) {
ours = true;
if (name->service && name->service[0] && name->proto && name->proto[0]) {
service = _mdns_get_service_item(name->service, name->proto);
}
} else if (!name->sub && _mdns_name_is_ours(name)) {
ours = true;
if (name->service && name->service[0] && name->proto && name->proto[0]) {
service = _mdns_get_service_item(name->service, name->proto);
}
} else {
if (!parsed_packet->authoritative || record_type == MDNS_NS) {
//skip this record
continue;
Expand Down

0 comments on commit b649603

Please sign in to comment.