Differentiate between NXDOMAIN and network failure for getaddrinfo
Categories
(Core :: Networking: DNS, task, P1)
Tracking
()
People
(Reporter: valentin, Assigned: valentin)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged][trr])
When calling PR_GetAddrInfoByName we should be able to differentiate between NXDOMAIN and a network failure.
We should check the PR_SetError result to see if they show up as different codes.
Assignee | ||
Comment 1•4 years ago
|
||
I've tested what PR_GetOSError returns for NXDOMAIN vs when the network is unreachable.
On Linux we get -2 (EAI_NONAME) for NXDOMAIN, and -3 (EAI_AGAIN) when the network is down.
However, on Windows, we always get 11001 (WSAHOST_NOT_FOUND) for both NXDOMAIN and network failure.
I don't think we have an easy way to fix this.
Dragana, what do you think?
Comment 2•4 years ago
|
||
This error is coming from the system call? I am asking because I know cases where (nspr transforms some errors )
Assignee | ||
Comment 4•4 years ago
|
||
We've determined that this impossible to differentiate given how the current DNS API works.
In the next iteration we might have a better way to do this, or if we end up implementing a Do53 resolver.
Description
•