Merge branch 'bugfix/mdns_any_type_share' into 'master'

mdns: Fix a portion of the queries are issued with the wildcard query type

See merge request idf/esp-idf!2886
pull/1284/merge
Jiang Jiang Jian 2018-08-15 00:52:21 +08:00
commit b96fa40dd1
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -1195,7 +1195,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)
@ -2570,7 +2570,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;
}