зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1674328 - Make DNS requests use TRR_DISABLED_MODE instead of using RESOLVE_DISABLE_TRR flag r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D95263
This commit is contained in:
Родитель
47366988d7
Коммит
e276174f5e
|
@ -135,7 +135,7 @@ async function dnsLookup(hostname, resolveCanonicalName = false) {
|
|||
},
|
||||
};
|
||||
let dnsFlags =
|
||||
Ci.nsIDNSService.RESOLVE_DISABLE_TRR |
|
||||
Ci.nsIDNSService.RESOLVE_TRR_DISABLED_MODE |
|
||||
Ci.nsIDNSService.RESOLVE_DISABLE_IPV6 |
|
||||
Ci.nsIDNSService.RESOLVE_BYPASS_CACHE |
|
||||
Ci.nsIDNSService.RESOLVE_CANONICAL_NAME;
|
||||
|
|
|
@ -304,26 +304,26 @@ NetworkConnectivityService::RecheckDNS() {
|
|||
nsAutoCString host;
|
||||
Preferences::GetCString("network.connectivity-service.DNSv4.domain", host);
|
||||
|
||||
rv = dns->AsyncResolveNative(
|
||||
host, nsIDNSService::RESOLVE_TYPE_DEFAULT,
|
||||
nsIDNSService::RESOLVE_DISABLE_IPV6 | nsIDNSService::RESOLVE_DISABLE_TRR,
|
||||
nullptr, this, NS_GetCurrentThread(), attrs,
|
||||
getter_AddRefs(mDNSv4Request));
|
||||
rv = dns->AsyncResolveNative(host, nsIDNSService::RESOLVE_TYPE_DEFAULT,
|
||||
nsIDNSService::RESOLVE_DISABLE_IPV6 |
|
||||
nsIDNSService::RESOLVE_TRR_DISABLED_MODE,
|
||||
nullptr, this, NS_GetCurrentThread(), attrs,
|
||||
getter_AddRefs(mDNSv4Request));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
Preferences::GetCString("network.connectivity-service.DNSv6.domain", host);
|
||||
rv = dns->AsyncResolveNative(
|
||||
host, nsIDNSService::RESOLVE_TYPE_DEFAULT,
|
||||
nsIDNSService::RESOLVE_DISABLE_IPV4 | nsIDNSService::RESOLVE_DISABLE_TRR,
|
||||
nullptr, this, NS_GetCurrentThread(), attrs,
|
||||
getter_AddRefs(mDNSv6Request));
|
||||
rv = dns->AsyncResolveNative(host, nsIDNSService::RESOLVE_TYPE_DEFAULT,
|
||||
nsIDNSService::RESOLVE_DISABLE_IPV4 |
|
||||
nsIDNSService::RESOLVE_TRR_DISABLED_MODE,
|
||||
nullptr, this, NS_GetCurrentThread(), attrs,
|
||||
getter_AddRefs(mDNSv6Request));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (StaticPrefs::network_connectivity_service_nat64_check()) {
|
||||
rv = dns->AsyncResolveNative("ipv4only.arpa"_ns,
|
||||
nsIDNSService::RESOLVE_TYPE_DEFAULT,
|
||||
nsIDNSService::RESOLVE_DISABLE_IPV4 |
|
||||
nsIDNSService::RESOLVE_DISABLE_TRR,
|
||||
nsIDNSService::RESOLVE_TRR_DISABLED_MODE,
|
||||
nullptr, this, NS_GetCurrentThread(), attrs,
|
||||
getter_AddRefs(mNAT64Request));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
|
|
@ -299,7 +299,7 @@ interface nsIDNSService : nsISupports
|
|||
* Use the static helper methods convert between the TRR mode and flags.
|
||||
*/
|
||||
const unsigned long RESOLVE_TRR_MODE_MASK = (1 << 11) | (1 << 12);
|
||||
|
||||
const unsigned long RESOLVE_TRR_DISABLED_MODE = (1 << 11);
|
||||
%{C++
|
||||
static uint32_t GetFlagsFromTRRMode(nsIRequest::TRRMode aMode) {
|
||||
return static_cast<uint32_t>(aMode) << 11;
|
||||
|
|
Загрузка…
Ссылка в новой задаче