You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that Async::DNS::Resolver will return CNAME records when querying SRV records for a domain that maps unknown sub-domains to a catch-all alias (ex: github.com). Where as Resolv::DNS will return an empty Array since the response records do not match the requested resource type.
This could be fixed by simply filtering the response records by class.
The text was updated successfully, but these errors were encountered:
postmodern
changed the title
Async::DNS::Resolve will return Resolv::DNS::Resource::IN::CNAME when Resolv::DNS::Resource::IN::SRV is requestedAsync::DNS::Resolver will return Resolv::DNS::Resource::IN::CNAME when Resolv::DNS::Resource::IN::SRV is requested
Apr 17, 2023
If making such a query gives such a response, I'm not sure we should filter it, at least not at the resolver level. Maybe a higher level interface like "get addresses" or such should do that though.
If the user is explicitly querying a specific type of DNS record, and they get back another kind of record, this will likely cause a bug (no method target for ...) or require the developer to add their own filtering.
Also running into this when querying MX records for potato.com, which is a CNAME to cs.62.net. I noticed that Resolv::DNS#getresources will actually filter the records by the given Resolv::DNS::Resource::IN:: class.
I noticed that
Async::DNS::Resolver
will returnCNAME
records when queryingSRV
records for a domain that maps unknown sub-domains to a catch-all alias (ex:github.com
). Where asResolv::DNS
will return an empty Array since the response records do not match the requested resource type.This could be fixed by simply filtering the response records by class.
Steps To Reproduce
Expected Behavior
Actual Behavior
Additional Information
The text was updated successfully, but these errors were encountered: