Add pref for resolving HTTPS records using native resolver on win 10
Categories
(Core :: Networking: DNS, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox123 | --- | fixed |
People
(Reporter: valentin, Assigned: valentin)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
In bug 1852900 we added the ability for Firefox to use the native OS resolver for HTTPS record resolution.
However, we discovered that DnsQuery_A doesn't return a proper result on windows 10.
Here's the report we made to microsoft:
When using the DNS APIs in Windows we've discovered some unexpected behaviour that's only happening on Windows 10.
In particular it's about DnsQuery_A [1] being used to resolve HTTPS records. The following snippet of code works correctly on Windows 11, but on Windows 10 the call to DnsQuery_A returns ERROR_SUCCESS, but the result is still NULL.
I have checked Wireshark, and the HTTPS request is sent and a response is received.
PDNS_RECORD result = nullptr;
DNS_STATUS status =
DnsQuery_A(host.get(), nsIDNSService::RESOLVE_TYPE_HTTPSSVC /* 65 */,
DNS_QUERY_STANDARD, nullptr, &result, nullptr);
if (status != ERROR_SUCCESS) {
LOG("DnsQuery_A failed with error: %ld\n", status);
return NS_ERROR_UNKNOWN_HOST;
}
LOG("result %p", result);
While I don't expect the Windows 10 implementation to know how to parse HTTPS/SVCB records I think it should still let me access the response as DNS_UNKNOWN_DATA, and that the response shouldn't be null.
Is this a known issue with DnsQuery_A or otherwise a limitation that is not documented?
For reference, my OS version is Windows 10 Pro / OS build 19045.3693 / Feature Experience Pack 1000.19053.1000.0
[1] https://learn.microsoft.com/en-us/windows/win32/api/windns/nf-windns-dnsquery_a
Assuming that Microsoft will eventually fix the issue on windows 10, we should add a pref that allows the resolution to happen, as it's currently hardcoded to only allow windows11
sNativeHTTPSSupported = mozilla::IsWin11OrLater();
| Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Comment 3•2 years ago
|
||
| bugherder | ||
Description
•