Open
Description
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.