Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mdns]: Fix the responder to ignore only invalid queries #758

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/mdns/.cz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions components/mdns/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/mdns/idf_component.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
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
Loading