mdns: Fix the resolver to correctly parse it's own non-strict answers

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.
pull/6882/head
David Cermak 2021-03-08 19:40:53 +01:00 zatwierdzone przez bot
rodzic 0eee31546d
commit b649603a0d
1 zmienionych plików z 5 dodań i 6 usunięć

Wyświetl plik

@ -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;