Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCached HOST_NOT_FOUND should not take precendence #134
Comments
HOST_NOT_FOUND (or NXDOMAIN in actual DNS terms) is a valid DNS response. It's thus correctly taken as the first answer. The
Yes, the fastest response is used. This is all about a split-brain DNS scenario. I understand your issue and I was annoyed myself by the same behavior of Windows. As a developer however, I don't know how to properly deal with this. Simply continuing to query servers just because a valid response isn't deemed valid in some setups isn't going to cut it. I'm open to ideas that don't change the current default behavior. |
I first thought I encountered a race condition and a bug related to the caching mechanism. But it's likely due to the same issue.
Observations:
My input:
Kotlin code (running on Android 8. 10.1.1.1 is my local OPNsense instance, running Unbound DNS):