Skip to content
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

dns: support legacy queries #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mhusaam
Copy link

@mhusaam mhusaam commented Feb 13, 2025

No description provided.

@mhusaam mhusaam marked this pull request as draft February 13, 2025 11:23
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.

Signed-off-by: Mohd Husaam Mehdi <[email protected]>
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 <[email protected]>
@mhusaam mhusaam force-pushed the for_mdns_legacy_queries branch from 6079636 to f057643 Compare February 13, 2025 11:25
@mhusaam mhusaam marked this pull request as ready for review February 13, 2025 12:15
@mhusaam mhusaam changed the title For mdns legacy queries dns: support legacy queries Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant