-
Notifications
You must be signed in to change notification settings - Fork 203
mDNS: when a reply do not repeat the questions, set authoritative flag #1292
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
base: main
Are you sure you want to change the base?
Conversation
|
/bot run formatting |
|
/bot run formatting |
|
@htibosch Seems like UTs are also failing, can you please help in checking on that. Thanks |
|
@htibosch I tried your changes and it fixed mDNS for me. I found, however, two small issues that still persist:
|
|
/bot run formatting |
|
/bot run formatting |
|
@bjsowa wrote:
I just checked these commands from a laptop: and I had these expected results, see this PCAP file: samples_mdns.zip My configuration is: |
|
Please find attached some code that I use for It will check the IP-type that is desired by the requester. Maybe that will solve the problem of the empty IPv6 address. |
This feels like a workaround rather than an actual solution. Why not add this logic to FreeRTOS+TCP? |
I can not agree more! I used mentioned code within a private project, and I am thinking of making this automatic, and downward-compatible. |
Description
Both mDNS and LLMNR work fine, except whan it receives a request from a Linux machine: we found that an mDNS server must set the authoritative flag, and also that it shall not repeat the Questions from the requester.
Other OSs like Windows are more forgiving.
Set a new variable
xSet.uxSkipCountas soon as the full name in Questions has been parsed. Why: because the Questions section will become theAnswerssection, containing:Name: 'full_name.local', Type A, Class IN, TTL, Addr length, Address.
Or the name followed by 16 or 28 bytes.
When replying to an mDNS request, do not include the Questions section: 'xSet.usQuestions' will become zero.
With thanks to @ActoryOu : mDNS sets the authoritative flag when replying. See PR Set MDNS AA bit while answering MDNS request. #1223
Do not handle type A when IPv4 is not enabled
Do not handle type AAAA when IPv6 is not enabled
Make sure that 'pxNewBuffer' will be released just before exiting the function
DNS_ParseDNSReply()Test Steps
I tested while enabling either
ipconfigUSE_MDNSoripconfigUSE_LLMNR. The former replies with an Answers section only, the latter repeats the questions and then sends the Answers.Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.