From cd07228f81603103e5b56f2d2334743a9db2f36c Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 4 Feb 2025 16:02:04 +0100 Subject: [PATCH 1/2] fix(mdns): Fix responder to ignore only invalid queries not the entire packet, so we can still reply to next questions Closes https://github.com/espressif/esp-protocols/issues/754 --- components/mdns/mdns.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/mdns/mdns.c b/components/mdns/mdns.c index 12539a4352..967519461d 100644 --- a/components/mdns/mdns.c +++ b/components/mdns/mdns.c @@ -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 { From 64d818b2d32495a911395640340735acca3d1c4a Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 7 Feb 2025 14:31:18 +0100 Subject: [PATCH 2/2] bump(mdns): 1.5.2 -> 1.5.3 1.5.3 Bug Fixes - Fix responder to ignore only invalid queries (cd07228f, #754) --- components/mdns/.cz.yaml | 2 +- components/mdns/CHANGELOG.md | 6 ++++++ components/mdns/idf_component.yml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/mdns/.cz.yaml b/components/mdns/.cz.yaml index 3ec98354e1..be067e4d92 100644 --- a/components/mdns/.cz.yaml +++ b/components/mdns/.cz.yaml @@ -3,6 +3,6 @@ commitizen: bump_message: 'bump(mdns): $current_version -> $new_version' pre_bump_hooks: python ../../ci/changelog.py mdns tag_format: mdns-v$version - version: 1.5.2 + version: 1.5.3 version_files: - idf_component.yml diff --git a/components/mdns/CHANGELOG.md b/components/mdns/CHANGELOG.md index 1522ca3725..419d952b1c 100644 --- a/components/mdns/CHANGELOG.md +++ b/components/mdns/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [1.5.3](https://github.com/espressif/esp-protocols/commits/mdns-v1.5.3) + +### Bug Fixes + +- Fix responder to ignore only invalid queries ([cd07228f](https://github.com/espressif/esp-protocols/commit/cd07228f), [#754](https://github.com/espressif/esp-protocols/issues/754)) + ## [1.5.2](https://github.com/espressif/esp-protocols/commits/mdns-v1.5.2) ### Bug Fixes diff --git a/components/mdns/idf_component.yml b/components/mdns/idf_component.yml index ea4e511a90..9d8792f9fe 100644 --- a/components/mdns/idf_component.yml +++ b/components/mdns/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.5.2" +version: "1.5.3" description: "Multicast UDP service used to provide local network service and host discovery." url: "https://github.com/espressif/esp-protocols/tree/master/components/mdns" issues: "https://github.com/espressif/esp-protocols/issues"