Skip to content

Commit

Permalink
fix(mdns): Fix responder to ignore only invalid queries
Browse files Browse the repository at this point in the history
not the entire packet, so we can still reply to next questions
  • Loading branch information
david-cermak committed Feb 4, 2025
1 parent 1c6580e commit 0e25523
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/mdns/mdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,11 @@ static void _mdns_create_answer_from_parsed_packet(mdns_parsed_packet_t *parsed_
shared = q->type == MDNS_TYPE_PTR || q->type == MDNS_TYPE_SDPTR || !parsed_packet->probe;
if (q->type == MDNS_TYPE_SRV || q->type == MDNS_TYPE_TXT) {
mdns_srv_item_t *service = _mdns_get_service_item_instance(q->host, q->service, q->proto, NULL);
if (service == NULL || !_mdns_create_answer_from_service(packet, service->service, q, shared, send_flush)) {
if (service == NULL) { // Service not found, but we continue to the next question
q = q->next;
continue;;
}
if (!_mdns_create_answer_from_service(packet, service->service, q, shared, send_flush)) {
_mdns_free_tx_packet(packet);
return;
} else {
Expand Down

0 comments on commit 0e25523

Please sign in to comment.