Skip to content

Commit 7e88bf0

Browse files
Increase dnssd kHostNameMaxLength to 40 bytes (#33468)
1 parent 83d35a3 commit 7e88bf0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lib/dnssd/Constants.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ namespace Dnssd {
2929
* Matter DNS host settings
3030
*/
3131

32-
inline constexpr size_t kHostNameMaxLength = 16; // MAC or 802.15.4 Extended Address in hex
32+
// Matter spec expects hostname to be MAC or 802.15.4 Extended Address in hex.
33+
// But in latest android nsdManager, it would set hostname with 40 bytes with prefix as android_,
34+
// and there is no existing API to update the hostname, therefore we put temporary workaround with 40 bytes.
35+
// Follow-up with ticket issue https://github.com/project-chip/connectedhomeip/issues/33474
36+
inline constexpr size_t kHostNameMaxLength = 40;
37+
//
3338

3439
/*
3540
* Matter DNS service subtypes

0 commit comments

Comments
 (0)