mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-22 14:57:30 +02:00
mdns: Fix parsing answers with questions when instance name not set
mdns resolver didn't correctly resolved queries when host name wasn't assigned. Fixed by allowing processing also if some answer present (non-strict mode) Closes https://github.com/espressif/esp-idf/issues/6598 * Original commit: espressif/esp-idf@34049454df
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
cbcbe4ffd7
commit
c3a5826d60
@ -2679,7 +2679,7 @@ void mdns_parse_packet(mdns_rx_packet_t * packet)
|
||||
}
|
||||
|
||||
//if we have not set the hostname, we can not answer questions
|
||||
if (header.questions && _str_null_or_empty(_mdns_server->hostname)) {
|
||||
if (header.questions && !header.answers && _str_null_or_empty(_mdns_server->hostname)) {
|
||||
free(parsed_packet);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user