-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] Chip-lighting-app with "minimal mdns" do not adhere to MDNS specs: Sends Multicast Truncated Responses #29521
Comments
Compiled how? Was this using minimal mdns or platform mdns? Also, the issue title is talking about chip-tool, but the actual description seems to be about chip-lighting-app. Which is it @Apollon77 ? |
Sorry to be inaccurate here. Ok I verified it. It is the "chip lighting app" taken from the certification binaries from Test Harness (so also not self compiled), last updated 16.9.23, so I can not tell how they are compiled ... When I see this output I would assume "minimal mdns" ...
If it helps I can play around with these and macos "self build" ones and see what they report. |
PS: A chip lighing app compiled on my macos seems to use platform mdns and behaves different |
Yes, that looks like minimal mdns. @andy31415 could you take a look, please? |
I think truncation bit was on purpose, maybe I had mis-read the spec. |
The setting is here: https://github.com/project-chip/connectedhomeip/blob/master/src/lib/dnssd/minimal_mdns/ResponseSender.cpp#L310 //....
if (!mResponseBuilder.Ok())
{
mResponseBuilder.Header().SetFlags(mResponseBuilder.Header().GetFlags().SetTruncated(true));
ReturnOnFailure(mSendState.SetError(FlushReply()));
//... And can be easily removed, however since we had a few iterations on this I am concerned not to introduce some odd incompatibility issues. It seems we probably have to track unicast vs multicast replies here. |
Generally I assume mac does the right thing, however we probably have to test backwards compatibility with avahi and maybe others. Probably should do it right after a branch point to allow things to settle down. Things that we seem to want to adjust: usage of truncated, maximum payload size. |
I agree. Announcing host and rest separately makes sense - but why multiple times each a bit differently? ;-) (and that apple implementation always announce a hostname with just 0 is still strange but most likely different topic). If I can support in that topic just poke me ... whatever you implement I would also add then in matter.js the same way for our "own implementation" - but we also plan to add more native options like avahi via dbus or such platform |
That's because we never get a useful MAC address. Filed #29556 |
Reproduction steps
I checked via Wireshark what a chip lighting app does MDNS wise and found that a Truncated response is sent to annoucne itself because all data do not fit into the 512 byte of a single MDNS message.
According to MDSN specs this should not be used - see https://www.rfc-editor.org/rfc/rfc6762.html#section-18.5
This is the wireshark output of the announcements sent out:
First "Truncated" message:
![Bildschirmfoto_2023-10-01_um_23 02 35](https://private-user-images.githubusercontent.com/11976694/271898595-208d283c-b98f-4923-8dff-28b4a3a2506c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NjA0NzQsIm5iZiI6MTcxOTc2MDE3NCwicGF0aCI6Ii8xMTk3NjY5NC8yNzE4OTg1OTUtMjA4ZDI4M2MtYjk4Zi00OTIzLThkZmYtMjhiNGEzYTI1MDZjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE1MDkzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJjOGFjNTlmMmJhN2ZhMjg5ZjAwMTdlMjU4Y2NlZTRhMDcyMzI4MjI0YTQyNmIyMmQwODY4MjRiNjQ1ZmEzMmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.yylZR--zOkdQMJJRgytKRA5p_SAotBuQeVq03cQxXNQ)
Second "Finalizing" message:
![Bildschirmfoto_2023-10-01_um_23 03 47](https://private-user-images.githubusercontent.com/11976694/271898632-33fc3992-9087-4c9a-b5bd-a654b4285d43.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NjA0NzQsIm5iZiI6MTcxOTc2MDE3NCwicGF0aCI6Ii8xMTk3NjY5NC8yNzE4OTg2MzItMzNmYzM5OTItOTA4Ny00YzlhLWI1YmQtYTY1NGI0Mjg1ZDQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE1MDkzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVjYzQzODNkOWVjNzk0ZTIyZTYyOGNhOGE3YTNhZGFkMDNlZjI3M2UwZGZhODUzNmY5ZTc4MzFjM2JhMGM0ZmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.87FOmUF284rBpn-8w4nPeR1RP-9fQE8KWOLIrAfRUKI)
The chip lighting app used here was run on a Raspi with Ubuntu.
Bug prevalence
always
GitHub hash of the SDK that was being used
can not reproduce, mid August 2023
Platform
other
Platform Version(s)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: