Граф коммитов

222 Коммитов

Автор SHA1 Сообщение Дата
Kershaw Chang 6a1cd1d896 Bug 1850367 - Add telemetry for the availability of HTTPS RR, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D186956
2023-09-04 09:21:47 +00:00
Kershaw Chang 0ad6584639 Bug 1825538 - Retry TRR request on on main thread when proxy connection failed, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D176621
2023-05-02 13:00:27 +00:00
Valentin Gosu 69fee90fda Bug 1812009 - Add prefs that allow increasing the DNS thread count r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D167648
2023-01-24 16:15:38 +00:00
Valentin Gosu 21d7e0ba7e Bug 1596845 - Turn nsIDNSService dns flags into a cenum r=necko-reviewers,geckoview-reviewers,kershaw,m_kato
This allows us to use a consistent size for the dnsFlags field.
across different files (previously some would use uint16_t and some uint32_t).
It also improves type safety - making sure we don't pass in the wrong value
to DNSFlags.

Depends on D164856

Differential Revision: https://phabricator.services.mozilla.com/D164857
2022-12-23 09:26:17 +00:00
Marian-Vasile Laza 56b22ee0ba Backed out 9 changesets (bug 1596845) for causing xpcshell failures on test_trr_enterprise_policy.js. CLOSED TREE
Backed out changeset 231acfc052bb (bug 1596845)
Backed out changeset 7d02dad4d720 (bug 1596845)
Backed out changeset b0449eec2671 (bug 1596845)
Backed out changeset 5cd033c9ef7c (bug 1596845)
Backed out changeset 98d583f1d19e (bug 1596845)
Backed out changeset b78bc0049605 (bug 1596845)
Backed out changeset 88919aaff89b (bug 1596845)
Backed out changeset f4adb3e7b8e1 (bug 1596845)
Backed out changeset b171f7ac0b40 (bug 1596845)
2022-12-23 09:21:39 +02:00
Valentin Gosu 10723cc64f Bug 1596845 - Turn nsIDNSService dns flags into a cenum r=necko-reviewers,geckoview-reviewers,kershaw,m_kato
This allows us to use a consistent size for the dnsFlags field.
across different files (previously some would use uint16_t and some uint32_t).
It also improves type safety - making sure we don't pass in the wrong value
to DNSFlags.

Depends on D164856

Differential Revision: https://phabricator.services.mozilla.com/D164857
2022-12-23 01:20:04 +00:00
Sandor Molnar 56d5efdcae Backed out 9 changesets (bug 1596845) for causing mochitest failures in browser/base/content/test/about/browser_aboutCertError_telemetry.js
Backed out changeset eb1e34c3041f (bug 1596845)
Backed out changeset af6d41439c60 (bug 1596845)
Backed out changeset f1447dd8df04 (bug 1596845)
Backed out changeset a383f2bbcaae (bug 1596845)
Backed out changeset 950c66dd6133 (bug 1596845)
Backed out changeset ab300239fd69 (bug 1596845)
Backed out changeset 8e1fe024b680 (bug 1596845)
Backed out changeset 80e5048d1f35 (bug 1596845)
Backed out changeset b14a4910d73b (bug 1596845)
2022-12-23 00:56:35 +02:00
Valentin Gosu 2f3eb78f06 Bug 1596845 - Turn nsIDNSService dns flags into a cenum r=necko-reviewers,geckoview-reviewers,kershaw,m_kato
This allows us to use a consistent size for the dnsFlags field.
across different files (previously some would use uint16_t and some uint32_t).
It also improves type safety - making sure we don't pass in the wrong value
to DNSFlags.

Depends on D164856

Differential Revision: https://phabricator.services.mozilla.com/D164857
2022-12-22 21:16:07 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Randell Jesup 39e3372695 Bug 1207753 - netwerk/dns thread-safety annotations r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130580
2022-05-12 21:55:01 +00:00
Kershaw Chang f63cffee0e Bug 1755902 - P2: Support port-prefixed query for HTTPS RR, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141718
2022-03-25 12:15:03 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Randell Jesup c716b31cc1 Bug 1747137: nsHostResolver cleanup r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D134440
2021-12-22 12:46:50 +00:00
Nihanth Subramanya 232120db57 Bug 1737198 - Part 1: Cycle DoH connection and retry upon lookup failure. r=necko-reviewers,valentin,dragana
1. When we see a failed TRR lookup in nsHostResolver::CompleteLookup, we trigger
a Confirmation and retry the lookup.
2. When triggering Confirmation, we set LOAD_FRESH_CONNECTION on the TRR channel,
which will then tell the connection manager to clear out the current TRR conneection.
This will cause us to use a new connection for the Confirmation and subsequent
lookups.

Differential Revision: https://phabricator.services.mozilla.com/D129227
2021-12-02 13:21:53 +00:00
Noemi Erli 56a43f9e9e Backed out 9 changesets (bug 1743122, bug 1737198) for causing assertion failure in TRRServiceChild.cpp CLOSED TREE
Backed out changeset 044390f37a8f (bug 1743122)
Backed out changeset d742fcfb8fad (bug 1737198)
Backed out changeset 9e4b52c06e3c (bug 1737198)
Backed out changeset 546b0f714a4d (bug 1737198)
Backed out changeset 189ed6145945 (bug 1737198)
Backed out changeset 3bab6f5b5b6b (bug 1737198)
Backed out changeset cdc9de540f2f (bug 1737198)
Backed out changeset e981d9e9c11c (bug 1737198)
Backed out changeset 04a75a837de9 (bug 1737198)
2021-12-02 13:40:57 +02:00
Nihanth Subramanya 0fc7da72e9 Bug 1737198 - Part 1: Cycle DoH connection and retry upon lookup failure. r=necko-reviewers,valentin,dragana
1. When we see a failed TRR lookup in nsHostResolver::CompleteLookup, we trigger
a Confirmation and retry the lookup.
2. When triggering Confirmation, we set LOAD_FRESH_CONNECTION on the TRR channel,
which will then tell the connection manager to clear out the current TRR conneection.
This will cause us to use a new connection for the Confirmation and subsequent
lookups.

Differential Revision: https://phabricator.services.mozilla.com/D129227
2021-12-02 10:13:33 +00:00
criss a587690d98 Backed out 9 changesets (bug 1737198, bug 1743122) by dev request. CLOSED TREE
Backed out changeset 8ea0830f0ebc (bug 1743122)
Backed out changeset 5d68e2b664cc (bug 1737198)
Backed out changeset c43e8d579121 (bug 1737198)
Backed out changeset 7c257276a971 (bug 1737198)
Backed out changeset 05e67f464ee1 (bug 1737198)
Backed out changeset 04bae7f14cec (bug 1737198)
Backed out changeset b703cf81d197 (bug 1737198)
Backed out changeset 6f1e88c3daf3 (bug 1737198)
Backed out changeset 960ecb376a56 (bug 1737198)
2021-12-02 11:57:08 +02:00
Nihanth Subramanya 66fb0a17d5 Bug 1737198 - Part 1: Cycle DoH connection and retry upon lookup failure. r=necko-reviewers,valentin,dragana
1. When we see a failed TRR lookup in nsHostResolver::CompleteLookup, we trigger
a Confirmation and retry the lookup.
2. When triggering Confirmation, we set LOAD_FRESH_CONNECTION on the TRR channel,
which will then tell the connection manager to clear out the current TRR conneection.
This will cause us to use a new connection for the Confirmation and subsequent
lookups.

Differential Revision: https://phabricator.services.mozilla.com/D129227
2021-12-02 09:40:51 +00:00
Alexandru Michis 045fc2e5f4 Backed out 8 changesets (bug 1737198, bug 1743122) for causing xpcshell failures in unit/test_trr.js
CLOSED TREE

Backed out changeset 525922fbae63 (bug 1743122)
Backed out changeset f370d8070271 (bug 1737198)
Backed out changeset 84a05e5b5e8d (bug 1737198)
Backed out changeset f7eeff0744f4 (bug 1737198)
Backed out changeset ae860da29fd4 (bug 1737198)
Backed out changeset 827456b1b2e8 (bug 1737198)
Backed out changeset 2ebd361d8512 (bug 1737198)
Backed out changeset c3b726205642 (bug 1737198)
2021-12-01 20:31:09 +02:00
Nihanth Subramanya eca944c48c Bug 1737198 - Part 1: Cycle DoH connection and retry upon lookup failure. r=necko-reviewers,valentin,dragana
1. When we see a failed TRR lookup in nsHostResolver::CompleteLookup, we trigger
a Confirmation and retry the lookup.
2. When triggering Confirmation, we set LOAD_FRESH_CONNECTION on the TRR channel,
which will then tell the connection manager to clear out the current TRR conneection.
This will cause us to use a new connection for the Confirmation and subsequent
lookups.

Differential Revision: https://phabricator.services.mozilla.com/D129227
2021-12-01 17:32:17 +00:00
Marian-Vasile Laza 9f1578bb4f Backed out 8 changesets (bug 1743122, bug 1737198) for causing build bustages on nsHostRecord.cpp. CLOSED TREE
Backed out changeset 83df9b71c3f8 (bug 1743122)
Backed out changeset 0b7bc91852a5 (bug 1737198)
Backed out changeset 595e81cc111c (bug 1737198)
Backed out changeset ac08b423bc60 (bug 1737198)
Backed out changeset 956ddc990493 (bug 1737198)
Backed out changeset 480e925ab804 (bug 1737198)
Backed out changeset 17276ab6d127 (bug 1737198)
Backed out changeset 45b749688e6f (bug 1737198)
2021-12-01 01:12:34 +02:00
Nihanth Subramanya 5914463d03 Bug 1737198 - Part 1: Cycle DoH connection and retry upon lookup failure. r=necko-reviewers,valentin,dragana
1. When we see a failed TRR lookup in nsHostResolver::CompleteLookup, we trigger
a Confirmation and retry the lookup.
2. When triggering Confirmation, we set LOAD_FRESH_CONNECTION on the TRR channel,
which will then tell the connection manager to clear out the current TRR conneection.
This will cause us to use a new connection for the Confirmation and subsequent
lookups.

Differential Revision: https://phabricator.services.mozilla.com/D129227
2021-11-30 22:02:12 +00:00
Valentin Gosu 106302bc12 Bug 1733938 - mTRRSkipReason telemetry should never be TRR_UNSET in telemetry r=nhnt11,kershaw,necko-reviewers
After bug 1719135 we no longer call TrrLookup from nsHostResolver::NameLookup
if we have not TRR service or if Enabled returns false. As a consequence
we'd record the TRR skip reason as TRR_UNSET - which we shouldn't do, as that
data point is useless.

This patch introduces a new TRRServiceEnabledForRecord method to
nsHostResolver that properly sets the skip reason when the TRR service
is not available or the request should skip TRR.

Differential Revision: https://phabricator.services.mozilla.com/D127442
2021-10-11 07:22:37 +00:00
Kershaw Chang 60dee51c3c Bug 1713796 - P3: Move the code related to pending queue out of nsHostResolver, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117324
2021-06-16 08:14:11 +00:00
Kershaw Chang decd8f6dca Bug 1713796 - P2: Take some code from nsHostResolver::ResolveHost and put them to other functions, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117323
2021-06-16 08:14:10 +00:00
Kershaw Chang 0c9e5842a2 Bug 1713796 - P1: Move nsHostRecord to another file, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117322
2021-06-16 08:14:10 +00:00
Kershaw Chang 4797c96a42 Bug 1702332 - Reduce the amount of DNS queries for unavailable type records, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D111655
2021-04-19 13:56:50 +00:00
Valentin Gosu ca325c9add Bug 1700076 - Fix modernize-use-default-member-init clang-tidy warnings in netwerk/dns/ r=necko-reviewers,dragana
This patch consists of the changes generated by running
`./mach static-analysis check --fix` on `netwerk/dns` after adding the
`modernize-use-default-member-init` clang-tidy lint.
Some additional changes were made by hand to ensure consistent results.
This patch ensures that all member variables are initialized in the header,
so when adding or changing constructors we don't miss one resulting in
uninitialized memory.

Differential Revision: https://phabricator.services.mozilla.com/D109339
2021-04-07 07:29:54 +00:00
Cosmin Sabou a9dd657e32 Backed out 18 changesets (bug 1700076, bug 1699691) for causing windows xpcshell failures on test_trr_cancel.js. CLOSED TREE
Backed out changeset 5f3eb0797c06 (bug 1699691)
Backed out changeset 768e56ccd244 (bug 1699691)
Backed out changeset d89075d72c83 (bug 1700076)
Backed out changeset fcf92dd5158a (bug 1700076)
Backed out changeset 8094a7ffc6a4 (bug 1700076)
Backed out changeset 9bc2539a1f5d (bug 1700076)
Backed out changeset fcf27f3c7b69 (bug 1700076)
Backed out changeset 753f4df63689 (bug 1700076)
Backed out changeset 1315c00d2137 (bug 1700076)
Backed out changeset 776c44be95f5 (bug 1700076)
Backed out changeset 2b8d8d63cacd (bug 1700076)
Backed out changeset bc92b34e5d71 (bug 1700076)
Backed out changeset 016c856573da (bug 1700076)
Backed out changeset c085324cb20e (bug 1700076)
Backed out changeset 26dc88b74377 (bug 1700076)
Backed out changeset 8dc21acb87f9 (bug 1700076)
Backed out changeset f36e9cb05851 (bug 1700076)
Backed out changeset fb3f2329ca37 (bug 1700076)
2021-04-06 21:49:20 +03:00
Valentin Gosu 3f1f271f39 Bug 1700076 - Fix modernize-use-default-member-init clang-tidy warnings in netwerk/dns/ r=necko-reviewers,dragana
This patch consists of the changes generated by running
`./mach static-analysis check --fix` on `netwerk/dns` after adding the
`modernize-use-default-member-init` clang-tidy lint.
Some additional changes were made by hand to ensure consistent results.
This patch ensures that all member variables are initialized in the header,
so when adding or changing constructors we don't miss one resulting in
uninitialized memory.

Differential Revision: https://phabricator.services.mozilla.com/D109339
2021-04-06 13:18:25 +00:00
Kershaw Chang ef06b68b6c Bug 1688092 - Update ODoHConfigs when the TTL expires r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D106075
2021-02-25 13:07:04 +00:00
Valentin Gosu 86622ba6a3 Bug 1694604 - Fix static analysis warnings in netwerk/dns r=necko-reviewers,dragana
Depends on D106262

Differential Revision: https://phabricator.services.mozilla.com/D106263
2021-02-24 16:37:04 +00:00
Valentin Gosu ff32c214b6 Bug 1694604 - Move TRRSkippedReason out of nsHostResolver.h r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106262
2021-02-24 16:37:03 +00:00
Kershaw Chang 9795f890cc Bug 1689987 - P3: Add some ODoH specific skip reasons r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D104831
2021-02-18 12:50:03 +00:00
Kershaw Chang a2532cb1f3 Bug 1689987 - P1: Don't mess up TRR telemetry when ODoH is used r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D104799
2021-02-18 12:50:02 +00:00
Valentin Gosu efa654d3d5 Bug 1691408 - Record confirmation event telemetry r=nhnt11,dragana,necko-reviewers
- Adds new TRR* argument to CompleteLookup so we can extract the channel
  status from the TRR request.
- Record event whenever the confirmation context changes
- NetworkID is recorded whenever we start a new confirmation attempt
- Captive portal status is updated based on observer notifications
- We keep a buffer of the last 32 confirmation results.

Differential Revision: https://phabricator.services.mozilla.com/D105173
2021-02-17 10:26:41 +00:00
Valentin Gosu 700f171e16 Bug 1691359 - Don't call TRRIsOkay for cancelled TRR channels r=nhnt11
- Pass status code to cancelled TRR channels
- When TRR timer expires, use NS_ERROR_NET_TIMEOUT_EXTERNAL
- When TRR is cancelled by nsHostResolver use NS_ERROR_ABORT
- Only call TRRIsOkay in OnStopRequest (doing so in TRR::Cancel causes us to
  call it twice for the same TRR)
- Use NS_NewRunnableFunction instead of ProxyCancel runnable object
- Introduce TRR_REQ_CANCELLED skip reason

Differential Revision: https://phabricator.services.mozilla.com/D104371
2021-02-08 12:38:39 +00:00
Nihanth Subramanya 48840a82cd Bug 1688228 - Introduce TRR_NXDOMAIN skip reason and record it when an rcode value of 0x03 is received. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D102774
2021-02-06 13:00:36 +00:00
Valentin Gosu 7d0af7171d Bug 1689108 - Report telemetry when TRRService is not confirmed because we have no connectivity r=necko-reviewers,dragana
Depends on D103234

Differential Revision: https://phabricator.services.mozilla.com/D103235
2021-01-28 10:51:57 +00:00
Nihanth Subramanya 3b7821e9cb Bug 1688239 - Move mozilla::net::ResolverMode into nsIDNSService and use it consistently. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D102794
2021-01-25 12:22:43 +00:00
Alexis Beingessner 70c9b7ef2c Bug 1681546 - rename MOZ_ATOMIC_BITFIELDS methods to Load/Store. r=valentin,necko-reviewers
I was running into issues where these names would conflict with the type's own Get/Set methods
and these names have the added benefit of indicating a bit more that atomic stuff is going on.

Differential Revision: https://phabricator.services.mozilla.com/D99268
2020-12-09 18:14:55 +00:00
Alexis Beingessner f0c5b52027 Bug 1670982 - Make the bitfields in nsHostResolver atomic. r=decoder,necko-reviewers,dragana,valentin
TSan found races between mResolveAgain and mGetTtl. This makes them non-UB.

The code is a bit weird. Although the values are typed as uint16_t's, they're
used as bools (even assigned true/false). In addition, the atomic bool mTRRUsed
could be folded into these fields, as there is a spare bit. I decided not to
change these things, as network code can have weird representation requirements
that I'd prefer the owners of the code chime in on first.

Differential Revision: https://phabricator.services.mozilla.com/D93417
2020-12-08 16:39:42 +00:00