-
Notifications
You must be signed in to change notification settings - Fork 10
dns: support legacy queries #18
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: master
Are you sure you want to change the base?
Conversation
6079636 to
f057643
Compare
33b617d to
bf58fb2
Compare
bf58fb2 to
1a46cf4
Compare
|
I just took a quick look at this PR, and I have some feedback: |
|
Okay, will look into it this way. |
1a46cf4 to
20d8ce1
Compare
|
Hi @nbd168, I see that blob_buf is not needed because we can take advantage of the existing Kindly review. |
20d8ce1 to
29600ed
Compare
* do not ignore legacy unicast queries, i.e., respond to them * comply with RFC 6762 Section 6.7 and repeat the query ID and the question in the response (RFC 6762 Section 6.7: ""If the source UDP port in a received Multicast DNS query is not port 5353, this indicates that the querier originating the query is a simple resolver... In this case, the Multicast DNS responder MUST send a UDP response directly back to the querier, via unicast, to the query packet's source IP address and port. This unicast response MUST be a conventional unicast response as would be generated by a conventional Unicast DNS server; for example, it MUST repeat the query ID and the question given in the query message.") * for legacy unicast queries, aggregate the answers in one response packet instead of sending multiple packets Signed-off-by: Mohd Husaam Mehdi <husaam.mehdi@iopsys.eu>
29600ed to
c2ce19e
Compare
|
Minor update: included sign-off and relevant RFC text in the commit message. |
dns: add support for Legacy Unicast Responses
For example, in case the query is of the type "One-Shot Multicast
DNS Queries", the questions also need to be sent along with the
answer, like a conventional DNS response (RFC 6762 Section 6.7).
Therefore, we save the question section while parsing DNS question.
dns: save question section when parsing DNS question
As per RFC 6762 Section 6.7 (Legacy Unicast Responses)
"If the source UDP port in a received Multicast DNS query is not port
5353, this indicates that the querier originating the query is a
simple resolver such as described in Section 5.1, "One-Shot Multicast
DNS Queries", which does not fully implement all of Multicast DNS.
In this case, the Multicast DNS responder MUST send a UDP response
directly back to the querier, via unicast, to the query packet's
source IP address and port. This unicast response MUST be a
conventional unicast response as would be generated by a conventional
Unicast DNS server; for example, it MUST repeat the query ID and the
question given in the query message."
Therefore, umdns should not ignore DNS questions coming from non-
multicast sources, and also provide question section which is not
usually provided in mDNS responses.
Signed-off-by: Mohd Husaam Mehdi husaam.mehdi@iopsys.eu