Bug 1737198 - Part 6: Enable strict fallback mode by default in Nightly. r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D132112
This commit is contained in:
Nihanth Subramanya 2021-12-02 13:21:55 +00:00
parent 7c1980a933
commit bdcc5aef9e
3 changed files with 6 additions and 2 deletions

View File

@ -9871,7 +9871,7 @@
# If true, don't fallback to native DNS upon network errors.
- name: network.trr.strict_native_fallback
type: RelaxedAtomicBool
value: false
value: @IS_NIGHTLY_BUILD@
mirror: always
# Single TRR request timeout, in milliseconds

View File

@ -57,6 +57,9 @@ function trr_test_setup() {
);
addCertFromFile(certdb, "http2-ca.pem", "CTu,u,u");
// Turn off strict fallback mode for most tests, it is tested specifically.
Services.prefs.setBoolPref("network.trr.strict_native_fallback", false);
// We intentionally don't set the TRR mode. Each test should set it
// after setup in the first test.
@ -91,6 +94,7 @@ function trr_clear_prefs() {
Services.prefs.clearUserPref(
"network.trr.send_empty_accept-encoding_headers"
);
Services.prefs.clearUserPref("network.trr.strict_native_fallback");
}
/// This class sends a DNS query and can be awaited as a promise to get the

View File

@ -348,7 +348,7 @@ async function test_strict_native_fallback() {
setModeAndURI(2, "doh?responseIP=2.2.2.2&corruptedAnswer=true");
await new TRRDNSListener("bar.example.com", "127.0.0.1"); // Should fallback
Services.prefs.clearUserPref("network.trr.strict_native_fallback");
Services.prefs.setBoolPref("network.trr.strict_native_fallback", false);
Services.prefs.clearUserPref("network.trr.request_timeout_ms");
Services.prefs.clearUserPref("network.trr.request_timeout_mode_trronly_ms");
}