Skip to content

Commit 936e43f

Browse files
authored
Merge pull request #758 from david-cermak/fix/mdns_ignore_only_invalid_queries
[mdns]: Fix the responder to ignore only invalid queries
2 parents 1c6580e + 64d818b commit 936e43f

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

components/mdns/.cz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ commitizen:
33
bump_message: 'bump(mdns): $current_version -> $new_version'
44
pre_bump_hooks: python ../../ci/changelog.py mdns
55
tag_format: mdns-v$version
6-
version: 1.5.2
6+
version: 1.5.3
77
version_files:
88
- idf_component.yml

components/mdns/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [1.5.3](https://github.com/espressif/esp-protocols/commits/mdns-v1.5.3)
4+
5+
### Bug Fixes
6+
7+
- 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))
8+
39
## [1.5.2](https://github.com/espressif/esp-protocols/commits/mdns-v1.5.2)
410

511
### Bug Fixes

components/mdns/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.5.2"
1+
version: "1.5.3"
22
description: "Multicast UDP service used to provide local network service and host discovery."
33
url: "https://github.com/espressif/esp-protocols/tree/master/components/mdns"
44
issues: "https://github.com/espressif/esp-protocols/issues"

components/mdns/mdns.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,11 @@ static void _mdns_create_answer_from_parsed_packet(mdns_parsed_packet_t *parsed_
18791879
shared = q->type == MDNS_TYPE_PTR || q->type == MDNS_TYPE_SDPTR || !parsed_packet->probe;
18801880
if (q->type == MDNS_TYPE_SRV || q->type == MDNS_TYPE_TXT) {
18811881
mdns_srv_item_t *service = _mdns_get_service_item_instance(q->host, q->service, q->proto, NULL);
1882-
if (service == NULL || !_mdns_create_answer_from_service(packet, service->service, q, shared, send_flush)) {
1882+
if (service == NULL) { // Service not found, but we continue to the next question
1883+
q = q->next;
1884+
continue;
1885+
}
1886+
if (!_mdns_create_answer_from_service(packet, service->service, q, shared, send_flush)) {
18831887
_mdns_free_tx_packet(packet);
18841888
return;
18851889
} else {

0 commit comments

Comments
 (0)