Open postmodern opened 1 year ago
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'll take a look and see what we can do.
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