mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-30 18:57:28 +02:00
mdns: Fix a portion of the queries are issued with the wildcard query type
* Original commit: espressif/esp-idf@f3f0445f4d
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
dd714947d6
commit
b4ab30b5de
@ -1195,7 +1195,7 @@ static void _mdns_create_answer_from_parsed_packet(mdns_parsed_packet_t * parsed
|
|||||||
}
|
}
|
||||||
if (service) {
|
if (service) {
|
||||||
if (q->type == MDNS_TYPE_PTR || q->type == MDNS_TYPE_ANY) {
|
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;
|
shared = true;
|
||||||
}
|
}
|
||||||
if (!_mdns_alloc_answer(&packet->answers, MDNS_TYPE_PTR, service->service, false, false)
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == MDNS_TYPE_ANY) {
|
if (type == MDNS_TYPE_ANY && !_str_null_or_empty(name->host)) {
|
||||||
parsed_packet->probe = true;
|
parsed_packet->probe = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user