Commit Graph

565 Commits

Author SHA1 Message Date
Oskar Mansfeld
6a7a8ec617 Bug 1947414 - grace period is now actually applied r=necko-reviewers,valentin
We set `grace=0` before for requests that had a TTL. Now that we want to experiment with bigger grace periods we don't zero the grace period at all anymore, no matter if there is a TTL or not.

Also cleaned up the (now unnessecary) nested if condition and removed double allocation of TTL data.

Differential Revision: https://phabricator.services.mozilla.com/D238033
2025-02-15 10:50:36 +00:00
Valentin Gosu
0473ae7be6 Bug 1900013 - Remove TRR fallback warning code from DNS code r=acreskey,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D237542
2025-02-12 14:30:26 +00:00
Florian Quèze
01ed3cb5e2 Bug 1944631 - Migrate histograms to use Glean APIs in netwerk/dns (excluding keyed boolean and categorical histograms that are not supported in Glean yet), r=chutten,necko-reviewers,valentin.
Differential Revision: https://phabricator.services.mozilla.com/D235632
2025-02-03 14:48:15 +00:00
Kershaw Chang
2187c3fa69 Bug 1935004 - Remove res_ninit, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D236345
2025-01-31 15:28:08 +00:00
Florian Quèze
9609e47f62 Bug 1879329 - script generated replacement of the GleanMetrics.h includes, r=chutten,valentin,media-playback-reviewers,cookie-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,rkraesig,emz,aabh,padenot.
Differential Revision: https://phabricator.services.mozilla.com/D234744
2025-01-21 11:21:45 +00:00
Kershaw Chang
ff1bfc0727 Bug 1910991 - Test case, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D232554
2025-01-07 11:30:11 +00:00
Stanca Serban
c23824a474 Backed out 2 changesets (bug 1910991) for causing bp-nu bustages in MockNetworkLayerController.h. CLOSED TREE
Backed out changeset 1dff4e00746b (bug 1910991)
Backed out changeset e7f9c389c2ca (bug 1910991)
2025-01-06 18:39:06 +02:00
Kershaw Chang
cb16afedc4 Bug 1910991 - Test case, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D232554
2025-01-06 15:02:47 +00:00
Valentin Gosu
d341105079 Bug 1936996 - Use static pref getters instead of observer notification r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D232039
2024-12-20 11:27:36 +00:00
Valentin Gosu
b517f6c3c5 Bug 1936996 - Convert dns prefs to StaticPrefs r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D232031
2024-12-20 11:27:35 +00:00
Kershaw Chang
836ff91d3c Bug 1932783 - Make nsHostKey::flags Atomic, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D229887
2024-11-26 14:11:41 +00:00
Valentin Gosu
71226b9e61 Bug 1931948 - Annotate TypeHostRecord::mResultsLock r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D229481
2024-11-21 09:26:59 +00:00
longsonr
74ed93ac4b Bug 1928694 - Replace mozilla::clamped with std::clamp r=kershaw,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D227677
2024-11-04 12:31:13 +00:00
Valentin Gosu
57a451be0f Bug 1122907 - Fix GetAddrInfo functions to pass in a uint32_t flags instead of uint16_t r=necko-reviewers,kershaw
None of the values in nsIDNSSerrvice::DNSFlags that are greater than 1 << 15
currently have any impact on the behaviour of GetAddrInfo, but if we wanted
to define others, those bits might get truncated.
It is better just to keep the same type all though the function call pipeline.

Depends on D212109

Differential Revision: https://phabricator.services.mozilla.com/D224931
2024-10-14 18:19:01 +00:00
Kershaw Chang
b10b3b9db1 Bug 1916418 - Expose IsTRR for nsIDNSHTTPSSVCRecord, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D222636
2024-10-08 09:31:55 +00:00
Butkovits Atila
937390a2eb Backed out 2 changesets (bug 1916418) for causing failures at test_trr_https_rr_with_cname.js. CLOSED TREE
Backed out changeset 7a4bfea4ab31 (bug 1916418)
Backed out changeset dee53e26cb1b (bug 1916418)
2024-10-07 15:34:55 +03:00
Kershaw Chang
6d218d5e42 Bug 1916418 - Expose IsTRR for nsIDNSHTTPSSVCRecord, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D222636
2024-10-07 11:17:35 +00:00
Stanca Serban
da51dce39e Backed out 2 changesets (bug 1916418) for causing multiple failures.
Backed out changeset 3ce20d01a9ac (bug 1916418)
Backed out changeset dffe7e257106 (bug 1916418)
2024-10-02 18:27:05 +03:00
Kershaw Chang
3123cb4022 Bug 1916418 - Expose IsTRR for nsIDNSHTTPSSVCRecord, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D222636
2024-10-02 12:59:04 +00:00
Kershaw Chang
cb47fe6457 Bug 1910593 - Don't prefetch HTTPS RR if proxyDNS is enabled, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D219528
2024-09-10 20:04:29 +00:00
Sandor Molnar
b911875a30 Backed out changeset 8b355ea0021b (bug 1910593) for causing bc failures @ nsHttpConnectionMgr.cpp CLOSED TREE 2024-09-10 18:59:32 +03:00
Kershaw Chang
ea17ce88fd Bug 1910593 - Don't prefetch HTTPS RR if proxyDNS is enabled, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D219528
2024-09-10 11:07:22 +00:00
edgul
5e6b8dbf82 Bug 1914141 - Added an ending-in-number check for non-ipv4 domains for Services.io.isValidHostname. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D220488
2024-09-05 21:07:34 +00:00
Tamas Szentpeteri
8d8358004d Backed out changeset 5daa91615f4c (bug 1910593) for causing bug 1914796. CLOSED TREE 2024-08-26 12:42:24 +03:00
Kershaw Chang
e66ae77378 Bug 1910593 - Don't prefetch HTTPS RR if proxyDNS is enabled, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D219528
2024-08-21 21:14:28 +00:00
Sandor Molnar
4b8d80ea23 Backed out changeset 409ae605c6ca (bug 1910593) for causing bc & xpc failures test_proxyDNS_leak & browser_check_identity_state.js CLOSED TREE 2024-08-21 12:10:28 +03:00
Kershaw Chang
9487968a52 Bug 1913809 - Introduce TRRSkippedReason::TRR_SYSTEM_SLEEP_MODE, r=necko-reviewers,fluent-reviewers,flod,valentin
Differential Revision: https://phabricator.services.mozilla.com/D219543
2024-08-21 08:04:29 +00:00
Kershaw Chang
3c5e581479 Bug 1910593 - Don't prefetch HTTPS RR if proxyDNS is enabled, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D219528
2024-08-21 07:49:17 +00:00
Kershaw Chang
e674f6f94d Bug 1903719 - Make InitMockHTTPSRecord return null when type is not RESOLVE_TYPE_HTTPSSVC, r=sunil
Differential Revision: https://phabricator.services.mozilla.com/D214548
2024-07-03 09:32:28 +00:00
Kershaw Chang
85ce7977ac Bug 1895741 - Clear _res when DNS thread is shutdown, r=sunil
Differential Revision: https://phabricator.services.mozilla.com/D214513
2024-07-02 20:45:18 +00:00
Tom Schuster
feaa0c77a1 Bug 1904004 - Use OriginAttributes::IsPrivateBrowsing instead of open coding PBM checks. r=timhuang,cookie-reviewers,anti-tracking-reviewers,profiler-reviewers,necko-reviewers,kershaw,dom-storage-reviewers,janv,canaltinova,dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D214532
2024-06-24 11:06:18 +00:00
Kershaw Chang
bff67195d7 Bug 1901990 - Introduce a pref for setting a mock HTTPS RR, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D213559
2024-06-14 13:42:37 +00:00
Iulian Moraru
349bc1fb9a Backed out changeset af0f14eed70e (bug 1901990) for causing bc failures on browser_mock_https_rr.js. CLOSED TREE 2024-06-14 15:00:57 +03:00
Kershaw Chang
f74e5e15ef Bug 1901990 - Introduce a pref for setting a mock HTTPS RR, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D213559
2024-06-14 09:11:49 +00:00
Valentin Gosu
35f9f7cdfb Bug 1898171 - Add profiler markers for when DNS resolutions start and are completed r=acreskey,necko-reviewers,julienw,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D211172
2024-06-04 17:59:19 +00:00
Jens Stutte
48236a1cba Bug 1891936 - Have explicit grace timeout settings for the DNS Resolver thread pool. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D209195
2024-06-01 09:05:54 +00:00
Jens Stutte
53e1705e16 Bug 1891664 - Have a grace timeout before shutting down excess idle threads. r=xpcom-reviewers,necko-reviewers,dom-storage-reviewers,nika,janv,jesup#!xpcom-reviewers
Have idleThreadGraceTimeout and idleThreadMaximumTimeout instead of just idleThreadTimeout.
Clarify that idleThreadMaximumTimeout is only affecting allowed idle threads.
Make idle threads end only after at minimum idleThreadGraceTimeout even if they are in excess.
Remove the idleThreadTimeoutRegressive setting.

Introduce a "most recently used" priority for notifying idle threads to
avoid excessive round-robin through all available idle threads.
The management of the linked list has constant time, adding thus only
minimal overhead wrt to the previous wasIdle flags we had.

As a side effect (and coming from the investigations in bug 1891732) to
some extent this can help to improve the "logical thread affinity",
together with trying to keep events dispatched with NS_DISPATCH_AT_END
on the dispatching thread as much as possible, which should help
TaskQueue a lot with affinity.

Differential Revision: https://phabricator.services.mozilla.com/D209884
2024-06-01 09:05:53 +00:00
Kershaw Chang
8a45b449d0 Bug 1896626 - Rename TRR_IS_OFFLINE to TRR_BROWSER_IS_OFFLINE, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D211838
2024-05-28 12:29:03 +00:00
Stanca Serban
e5b6685ba8 Backed out changeset 10479ec2f64e (bug 1853497) for causing process crashes in libresolv.so. 2024-05-13 20:41:21 +03:00
Kershaw Chang
62d2209ccf Bug 1853497 - Call res_ninit on network change, r=necko-reviewers,jesup,valentin
Differential Revision: https://phabricator.services.mozilla.com/D206905
2024-05-13 15:04:54 +00:00
Kershaw Chang
8b15e1a021 Bug 1893944 - Don't resolve HTTPS RR for local domains, r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D208984
2024-05-03 09:37:40 +00:00
Ser Freeman
5d2aee97a6 Bug 1810362 - Sort the addresses in a DNS lookup result so the IPv6 ones come first. r=valentin,necko-reviewers,kershaw
Introduce network.dns.preferIPv6 pref to place IPv6 addresses first in a DNS lookup result.

Differential Revision: https://phabricator.services.mozilla.com/D206843
2024-04-12 10:39:32 +00:00
Valentin Gosu
b290f7fae3 Bug 1885529 - Also update nsHostResolver::mActiveAnyThreadCount in CompleteLookupByTypeLocked when resolving via native DNS r=necko-reviewers,jesup
The issue here is only obvious on Windows, when network.dns.get-ttl=true
and network.dns.native_https_query=true.

GetTTL will cause another resolution to happen with a low priority,
but these don't get picked up unless
mActiveAnyThreadCount < MaxResolverThreadsAnyPriority()

This causes the DNS_NATIVE_QUEUING probe to increase since these
queries don't get picked up immediately.

Also decrementing mActiveAnyThreadCount for ByType records makes
sure it always has the correct value.

Differential Revision: https://phabricator.services.mozilla.com/D206498
2024-04-04 14:24:20 +00:00
Kershaw Chang
eca5f8c2b4 Bug 1884628 - Revert Bug 1853497, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D204199
2024-03-11 15:13:24 +00:00
Kershaw Chang
6b1778f792 Bug 1853497 - Avoid racing on static global __res_state, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D201945
2024-02-27 20:04:46 +00:00
Valentin Gosu
4a19b2b7d9 Bug 1881437 - Use a thread local __res_state for HTTPS res_nquery r=necko-reviewers,kershaw
This makes it so each thread has its own __res_state instead of using
the global _res which could cause data races.

Differential Revision: https://phabricator.services.mozilla.com/D202400
2024-02-22 12:46:58 +00:00
Valentin Gosu
7509dd3264 Bug 1878506 - Don't remove DNS record from queue without resolving r=necko-reviewers,kershaw
Before this change, we would have removed the record from the queue,
it would have not QI'd to a AddrHostRecord so we would not have returned it.
That meant the DNS resolution never completed, and blocked the request
forever.

Differential Revision: https://phabricator.services.mozilla.com/D200786
2024-02-13 09:47:07 +00:00
Valentin Gosu
1f57d1b8ea Bug 1879165 - Record telemetry for how many native DNS requests we make in private browsing r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D201013
2024-02-09 09:55:22 +00:00
Valentin Gosu
07f1bf4fd5 Bug 1873461 - Add pref for resolving HTTPS records using native resolver on win 10 r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D198020
2024-01-10 07:59:17 +00:00
Valentin Gosu
18e8e60cc9 Bug 1852900 - Use android_res_nquery from libandroid.so to resolve HTTPS records on Android (API level >= 29) r=necko-reviewers,jesup
Depends on D194515

Differential Revision: https://phabricator.services.mozilla.com/D196068
2023-12-19 00:06:53 +00:00