Skip to content

mdns component does not support subtypes containing \0 bytes (IDFGH-15165) #804

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

Open
3 tasks done
sv-abl opened this issue Apr 23, 2025 · 0 comments
Open
3 tasks done
Assignees
Labels
Status: Opened Issue is new

Comments

@sv-abl
Copy link

sv-abl commented Apr 23, 2025

Answers checklist.

  • I have read the documentation for esp-protocols components and the issue is not addressed there.
  • I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

RFC 6763: DNS-Based Service Discovery specifies in section 7.1 Selective Instance Enumeration (Subtypes) (https://www.rfc-editor.org/rfc/rfc6763.html#section-7.1):

Subtype strings (e.g., "_printer" in the example above) may be constructed using arbitrary 8-bit data values.

(emphasis added for clarity of this issue's point).

Arbitrary 8-bit data values definitely include \0 bytes. However, they are obviously not supported by the current API. To support them would require, inter alia, a change of mdns_subtype_item_t to contain a length field, e.g.:

typedef struct {
    const uint8_t *subtype;
    size_t length;
} mdns_subtype_item_supporting_arbitrary_data_t;

As there is currently a refactoring of the mDNS component going on in PR #776, it is probably an excellent moment to fix that issue.

@github-actions github-actions bot changed the title mdns component does not support subtypes containing \0 bytes mdns component does not support subtypes containing \0 bytes (IDFGH-15165) Apr 23, 2025
@espressif-bot espressif-bot added the Status: Opened Issue is new label Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new
Projects
None yet
Development

No branches or pull requests

3 participants