How to handle RFC 8482 (ANY request getting a HINFO response) #202
-
For a project I want to resolve host names in code and not using the DNS settings from the OS/IP stack. On the website of DnsClient this DNS query is resolved correctly using type A or CNAME so I would like to know how I should handle RFC 8482 responses with the DnsClient library. The A and CNAME type returned no results with this code (using 8.8.8.8:53 in the lookupClient)
This is the concept code I created to query the DNS again
And the last test returned an A but no CNAME record. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi Eric, TLDR is, ANY is obsolete and should not be used anymore. To your question, just don't use it anymore. The blog post also has some examples for different answers which only have the response type in common. |
Beta Was this translation helpful? Give feedback.
-
Yes I read the blog, it explained to me why I was getting no result when using query type ANY. Ergo, always use query type A to get the IP address of a host :) |
Beta Was this translation helpful? Give feedback.
Yes I read the blog, it explained to me why I was getting no result when using query type ANY.
The funny thing was when I switched in the code to query type A I was getting no result.
A few hairs less, and several cups of coffee later I still could not understand why.
Now a few hours later, I get on both methods mentioned above a result with query type A.
Is cache somewhere playing tricks on me?
Ergo, always use query type A to get the IP address of a host :)