Repository navigation
mDNS: when a reply do not repeat the questions, set authoritative flag - #1292
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 |
1 similar comment
|
/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. |
|
Hi, is there anyone who can look at the failing CI checks please? |
ca67028 to
4367705
Compare
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.