Commit graph

89 commits

Author SHA1 Message Date
Mark Banner
58ce1f1fce Bug 1783565 - Enable ESLint rules no-eval, no-nested-ternary, no-throw-literal for the rest of netwerk. r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D153896
2022-08-16 08:10:38 +00:00
Mark Banner
d5e2960048 Bug 1783565 - Enable ESLint rules for no-arbitrary-setTimeout, no-define-cc-etc and consistent-return on netwerk/. r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D153895
2022-08-16 08:10:38 +00:00
Mark Banner
f0ab56decf Bug 1784699 - Ignore ESLint no-undef warnings in xpcshell-tests where functions are processed in other scopes. r=arai,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D154600
2022-08-15 16:50:30 +00:00
Butkovits Atila
57077f89fc Backed out 4 changesets (bug 1783565) for causing failures at test_origin.js. CLOSED TREE
Backed out changeset 289d233f1266 (bug 1783565)
Backed out changeset 3523c3cede7d (bug 1783565)
Backed out changeset cc2d5eaf69d2 (bug 1783565)
Backed out changeset 7e11b0d6e731 (bug 1783565)
2022-08-08 18:17:00 +03:00
Mark Banner
3a58ec0d05 Bug 1783565 - Enable ESLint rules no-eval, no-nested-ternary, no-throw-literal for the rest of netwerk. r=dragana,necko-reviewers
Depends on D153895

Differential Revision: https://phabricator.services.mozilla.com/D153896
2022-08-08 14:30:33 +00:00
Mark Banner
fc8a4aff9b Bug 1783565 - Enable ESLint rules for no-arbitrary-setTimeout, no-define-cc-etc and consistent-return on netwerk/. r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D153895
2022-08-08 14:30:33 +00:00
Kershaw Chang
19ef172933 Bug 1772111 - Allow to retry TRR for recoverable errors, r=necko-reviewers,dragana
Some details about this retry logic:
 - We'll create a confirmation task with fresh connection.
 - Trigger a new confirmation immediately upon TRR lookup failure.
 - We still use the short mode 2 timeout.

Differential Revision: https://phabricator.services.mozilla.com/D148106
2022-06-16 09:56:05 +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
Kershaw Chang
974130bad4 Bug 1755902 - P1: Rename nsIDNSResolverInfo to nsIDNSAdditionalInfo and add port, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D141717
2022-03-25 12:15:03 +00:00
edguloien
7b9d1e2937 Bug 1752621 - Improve http/2 prefs: changing spdy prefs to http2, making them static prefs and updating the tests. r=dragana,necko-reviewers,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D139941
2022-03-15 08:54:01 +00:00
Kershaw Chang
b51c0d6601 Bug 1749637 - Make sure DNS service is created before running the test, r=necko-reviewers,valentin
Like D139106, we should create DNS service earlier.

Differential Revision: https://phabricator.services.mozilla.com/D139583
2022-02-24 22:02:45 +00:00
Valentin Gosu
f2ce1bed77 Bug 1743022 - Rename network.trr.blacklist-duration to network.trr.temp_blocklist_durations_sec r=necko-reviewers,kershaw
Also turns it into a static pref r=#necko

Differential Revision: https://phabricator.services.mozilla.com/D136530
2022-01-25 15:57:03 +00:00
Sandor Molnar
9341f771cd Backed out 2 changesets (bug 1743022) for causing xpc failures in test_trr_blocklist. CLOSED TREE
Backed out changeset 1acf0c8e8663 (bug 1743022)
Backed out changeset e8822e38828f (bug 1743022)
2022-01-21 22:23:59 +02:00
Valentin Gosu
e382a176b2 Bug 1743022 - Rename network.trr.blacklist-duration to network.trr.temp_blocklist_durations_sec r=necko-reviewers,kershaw
Also turns it into a static pref r=#necko

Differential Revision: https://phabricator.services.mozilla.com/D136530
2022-01-21 18:54:28 +00:00
Nihanth Subramanya
6b8bc2088d Bug 1743122 - Disable TRR temp blocklist feature in tests. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D132245
2021-12-02 13:21:56 +00:00
Nihanth Subramanya
bdcc5aef9e Bug 1737198 - Part 6: Enable strict fallback mode by default in Nightly. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D132112
2021-12-02 13:21:55 +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
52ce47f7bf Bug 1743122 - Disable TRR temp blocklist feature in tests. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D132245
2021-12-02 10:13:36 +00:00
Nihanth Subramanya
cbd0f96f31 Bug 1737198 - Part 6: Enable strict fallback mode by default in Nightly. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D132112
2021-12-02 10:13:35 +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
855a1bda62 Bug 1743122 - Disable TRR temp blocklist feature in tests. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D132245
2021-12-02 09:40:54 +00:00
Nihanth Subramanya
c7d9cd9aa0 Bug 1737198 - Part 6: Enable strict fallback mode by default in Nightly. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D132112
2021-12-02 09:40:53 +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
a993ca428a Bug 1743122 - Disable TRR temp blocklist feature in tests. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D132245
2021-12-01 17:32:20 +00:00
Nihanth Subramanya
1f4fc6d190 Bug 1737198 - Part 6: Enable strict fallback mode by default in Nightly. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D132112
2021-12-01 17:32:19 +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
bfe1f1b848 Bug 1743122 - Disable TRR temp blocklist feature in tests. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D132245
2021-11-30 22:02:15 +00:00
Nihanth Subramanya
e34f0085bd Bug 1737198 - Part 6: Enable strict fallback mode by default in Nightly. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D132112
2021-11-30 22:02:14 +00:00
Kershaw Chang
05fc784046 Bug 1739001 - Test case, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D130815
2021-11-29 15:19:16 +00:00
Mark Banner
b5e3aa0e47 Bug 1741167 - Enable ESLint rule mozilla/use-services for rest of netwerk. r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D131131
2021-11-18 18:05:02 +00:00
Valentin Gosu
3e89a5179a Bug 1566998 - A or AAAA TRR request should not fallback to Do53 if there is a record for the other family r=nhnt11
Normally DNS resolutions are AF_UNSPEC - meaning that both A and AAAA
responses are acceptable.
However, some consumers of the DNS API will query A or AAAA separately
(like the WebRTC code), and use the responses independently.
In that case, we want to ensure that for a host that only has a A record,
we don't fallback to Do53 for the AAAA request and leak the hostname to
the system resolver.

To achieve this we change the logic as such:
If the response from DoH was NXDOMAIN we then query the other family.
If the other response was OK, that means we should not fallback to Do53.
If the other family response was also NXDOMAIN, the host is probably not
available to the public internet and falling back is probably fine.

Differential Revision: https://phabricator.services.mozilla.com/D130047
2021-11-11 10:07:33 +00:00
Valentin Gosu
e1e759dc36 Bug 1566998 - Improve awaiting new TRRDNSListener by returning an object r=necko-reviewers,kershaw
It's nicer to destructure the response using
`let {inRecord, inStatus} = await new TRRDNSListener(...)`
instead of
`let [,inRecord,inStatus] = await new TRRDNSListener(...)`

Differential Revision: https://phabricator.services.mozilla.com/D130042
2021-11-11 10:07:31 +00:00
Butkovits Atila
4059928c5d Backed out 7 changesets (bug 1566998) for causing build bustages at Logging.h.
Backed out changeset 1d0f667507f4 (bug 1566998)
Backed out changeset dc39d8837aae (bug 1566998)
Backed out changeset 24f76460c44b (bug 1566998)
Backed out changeset b674d5f15f60 (bug 1566998)
Backed out changeset f392ebf40d2a (bug 1566998)
Backed out changeset ecbfa0721168 (bug 1566998)
Backed out changeset d948fe16b8b0 (bug 1566998)
2021-11-09 20:24:03 +02:00
Valentin Gosu
b95b36f385 Bug 1566998 - A or AAAA TRR request should not fallback to Do53 if there is a record for the other family r=nhnt11
Normally DNS resolutions are AF_UNSPEC - meaning that both A and AAAA
responses are acceptable.
However, some consumers of the DNS API will query A or AAAA separately
(like the WebRTC code), and use the responses independently.
In that case, we want to ensure that for a host that only has a A record,
we don't fallback to Do53 for the AAAA request and leak the hostname to
the system resolver.

To achieve this we change the logic as such:
If the response from DoH was NXDOMAIN we then query the other family.
If the other response was OK, that means we should not fallback to Do53.
If the other family response was also NXDOMAIN, the host is probably not
available to the public internet and falling back is probably fine.

Differential Revision: https://phabricator.services.mozilla.com/D130047
2021-11-09 16:41:46 +00:00
Valentin Gosu
37f236afbe Bug 1566998 - Improve awaiting new TRRDNSListener by returning an object r=necko-reviewers,kershaw
It's nicer to destructure the response using
`let {inRecord, inStatus} = await new TRRDNSListener(...)`
instead of
`let [,inRecord,inStatus] = await new TRRDNSListener(...)`

Differential Revision: https://phabricator.services.mozilla.com/D130042
2021-11-09 16:41:44 +00:00
Valentin Gosu
17af9b6dd6 Bug 1716571 - Dynamically set up android port forwarding for trr tests r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D118413
2021-08-16 13:41:58 +00:00
Valentin Gosu
fffedbcc06 Bug 1703216 - Get rid of network.trr.bootstrapAddress pref r=nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D110913
2021-04-12 16:07:06 +00:00
Valentin Gosu
8cd440e44c Bug 1699691 - Add more confirmation tests r=necko-reviewers,dragana
Also makes sure not to trigger two confirmations when the URI pref changes.

Differential Revision: https://phabricator.services.mozilla.com/D109620
2021-04-07 07:30:00 +00:00
Valentin Gosu
6fc85e2dea Bug 1700076 - Make TRRDNSListener handle for type records resolves r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D109591
2021-04-07 07:29:55 +00:00
Valentin Gosu
89a7e43734 Bug 1700076 - Add ability to cancel TRR requests before they're dispatched r=necko-reviewers,dragana
A TRR request is created and dispatched to the handling thread.
If we want to cancel it, we may do so before the runnable has been handled
and there's no HTTP channel - so the cancel was a NO-OP.
Here we add mCancelled which is consulted in SendHTTPRequest to check
if the request has already been cancelled.

Differential Revision: https://phabricator.services.mozilla.com/D109590
2021-04-07 07:29:55 +00:00
Valentin Gosu
726f30aa64 Bug 1700076 - Add ability to count number of DoH requests that reach the TRRServer r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D109589
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
0969c40fb8 Bug 1699691 - Add more confirmation tests r=necko-reviewers,dragana
Also makes sure not to trigger two confirmations when the URI pref changes.

Differential Revision: https://phabricator.services.mozilla.com/D109620
2021-04-06 13:18:31 +00:00
Valentin Gosu
c82e24d35f Bug 1700076 - Make TRRDNSListener handle for type records resolves r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D109591
2021-04-06 13:18:26 +00:00
Valentin Gosu
c4b0fc5bb7 Bug 1700076 - Add ability to cancel TRR requests before they're dispatched r=necko-reviewers,dragana
A TRR request is created and dispatched to the handling thread.
If we want to cancel it, we may do so before the runnable has been handled
and there's no HTTP channel - so the cancel was a NO-OP.
Here we add mCancelled which is consulted in SendHTTPRequest to check
if the request has already been cancelled.

Differential Revision: https://phabricator.services.mozilla.com/D109590
2021-04-06 13:18:26 +00:00
Valentin Gosu
a23c89f8b9 Bug 1700076 - Add ability to count number of DoH requests that reach the TRRServer r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D109589
2021-04-06 13:18:26 +00:00
Nihanth Subramanya
909670d78f Bug 1694521 - Part 3: Adapt TRRDNSListener in head_trr.js for use in test_trr.js. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106342
2021-03-21 20:20:36 +00:00
Nihanth Subramanya
abe5ebef17 Bug 1694521 - Part 1: Clean up test_trr.js. r=necko-reviewers,valentin
1. Moved some setup stuff to head.js
2. Removed dumps
3. Changed comments to info()s at the beginning of tests
4. Combined some related tests.
5. Added helper to set TRR mode and uri
6. Some de-duplication when needing to do a test for different modes (more to be done)
7. Added some comments where missing, e.g. linking a bug
8. Gave all test functions good names

Differential Revision: https://phabricator.services.mozilla.com/D106215
2021-03-21 20:20:35 +00:00
smolnar
aec12328ea Backed out 6 changesets (bug 1608066, bug 1694521) for causing xpc failures in netwerk/test/unit/test_trr.js CLOSED TREE
Backed out changeset 8e3d7b19942b (bug 1608066)
Backed out changeset bce9de43b16f (bug 1694521)
Backed out changeset 3ca672212d45 (bug 1694521)
Backed out changeset d583fb117af4 (bug 1694521)
Backed out changeset bac1e7636cea (bug 1694521)
Backed out changeset c8f117ae9339 (bug 1694521)
2021-03-21 03:57:41 +02:00
Nihanth Subramanya
ba0b713432 Bug 1694521 - Part 3: Adapt TRRDNSListener in head_trr.js for use in test_trr.js. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106342
2021-03-21 01:17:29 +00:00