Valentin Gosu
70d2b8f596
Bug 1779110 - Do not follow CNAME for NODATA records r=necko-reviewers,kershaw
...
If the response has the RA flag set, that means the recursive
resolver has probably followed the CNAME chain already, so
issuing other requests would be pointless.
Differential Revision: https://phabricator.services.mozilla.com/D153512
2022-08-10 09:38:07 +00:00
Valentin Gosu
2a6796a2d7
Bug 1779110 - Skip HTTPS AliasMode record if the RR type is not HTTPS r=necko-reviewers,kershaw
...
According to https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https#section-2.4.2
> Unlike CNAME, AliasMode
> records do not affect the resolution of other RR types, and apply
> only to a specific service, not an entire domain name.
As such, we should skip the AliasMode response if the RR type is not HTTPS.
Additionally, when an AliasMode record is present in the response, we must
ignore any ServiceMode records present in the response.
https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https#section-2.4.1
> Within a SVCB RRSet, all RRs SHOULD have the same Mode. If an RRSet
> contains a record in AliasMode, the recipient MUST ignore any
> ServiceMode records in the set.
Differential Revision: https://phabricator.services.mozilla.com/D153511
2022-08-10 09:38:07 +00:00
Iulian Moraru
f9a7d1eb9b
Backed out 2 changesets (bug 1779110) for causing xpcshell failures on test_trr_httpssvc_wrap.js. CLOSED TREE
...
Backed out changeset f6a9dff98882 (bug 1779110)
Backed out changeset 6d95df4686fc (bug 1779110)
2022-08-09 16:52:14 +03:00
Valentin Gosu
4b8c434c26
Bug 1779110 - Do not follow CNAME for NODATA records r=necko-reviewers,kershaw
...
If the response has the RA flag set, that means the recursive
resolver has probably followed the CNAME chain already, so
issuing other requests would be pointless.
Differential Revision: https://phabricator.services.mozilla.com/D153512
2022-08-09 12:16:34 +00:00
Valentin Gosu
b4bd0c45a0
Bug 1779110 - Skip HTTPS AliasMode record if the RR type is not HTTPS r=necko-reviewers,kershaw
...
According to https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https#section-2.4.2
> Unlike CNAME, AliasMode
> records do not affect the resolution of other RR types, and apply
> only to a specific service, not an entire domain name.
As such, we should skip the AliasMode response if the RR type is not HTTPS.
Additionally, when an AliasMode record is present in the response, we must
ignore any ServiceMode records present in the response.
https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https#section-2.4.1
> Within a SVCB RRSet, all RRs SHOULD have the same Mode. If an RRSet
> contains a record in AliasMode, the recipient MUST ignore any
> ServiceMode records in the set.
Differential Revision: https://phabricator.services.mozilla.com/D153511
2022-08-09 12:16:33 +00:00
Nika Layzell
997047e2a4
Bug 1772006 - Part 4: Simplify and move the string comparison APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,dragana,barret
...
This patch moves EqualsIgnoreCase to ns[T]StringObsolete, and removes
the aCount argument, instead migrating callers to use `StringBeginsWith`
with a case-insensitive comparator.
In addition, nsTStringRepr::Compare was removed and replaced with either
calls to methods like `StringBeginsWith` or the global `Compare` method.
These changes required some modifications at call-sites but should make
the behaviour less surprising and more consistent.
Differential Revision: https://phabricator.services.mozilla.com/D148299
2022-07-30 00:12:48 +00:00
Kershaw Chang
0ec6d36308
Bug 1765590 - Don't use port prefix qname as TargetName, r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D149511
2022-06-29 20:03:13 +00:00
criss
c6b2c5db61
Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE
...
Backed out changeset f17c7565707b (bug 1772006)
Backed out changeset c725fe1f5882 (bug 1772006)
Backed out changeset d19663161261 (bug 1772006)
Backed out changeset b6611ab002d9 (bug 1772006)
Backed out changeset 790f42b64af9 (bug 1772006)
Backed out changeset 79a734b4e4d9 (bug 1772006)
Backed out changeset 42730aae16ea (bug 1772006)
Backed out changeset b2542aef3054 (bug 1772006)
Backed out changeset 962bfea4a309 (bug 1772006)
2022-06-11 01:13:42 +03:00
Nika Layzell
1475267b8c
Bug 1772006 - Part 5: Simplify and move the string comparison APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,dragana,barret
...
In addition to moving these methods to a more appropriate file, they were
simplified to make them easier to maintain in the future.
nsTStringRepr::Compare was extended to also work on char16_t strings, and the
case insensitive and other options were removed as they aren't necessary. This
required some changes to callers in the tree.
The EqualsIgnoreCase method was also simplified by using `std::string_view`.
Differential Revision: https://phabricator.services.mozilla.com/D148299
2022-06-10 21:12:07 +00:00
Valentin Gosu
0337a7de38
Bug 1743022 - Add tests for TRR temporary blocklisting r=necko-reviewers,kershaw
...
* DNSPacket::Decode now returns an error code for NS responses with a non-zero
RCODE. Previously, when we'd do the check for the parent domain, we'd treat
any DoH response as a valid NS, making the entire check for parents useless.
* Changes the documentation for this feature to mention the prefs used by this
feature.
* I don't think we need to worry about clearing the blocklist when the DNS
cache is cleared. For testing we can simply disable the blocklist. In real
life the blocklist is only 60 seconds and it's unlikely to cause problems
for users.
Depends on D136530
Differential Revision: https://phabricator.services.mozilla.com/D136531
2022-01-25 15:57:04 +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
6a5c6e31bd
Bug 1743022 - Add tests for TRR temporary blocklisting r=necko-reviewers,kershaw
...
* DNSPacket::Decode now returns an error code for NS responses with a non-zero
RCODE. Previously, when we'd do the check for the parent domain, we'd treat
any DoH response as a valid NS, making the entire check for parents useless.
* Changes the documentation for this feature to mention the prefs used by this
feature.
* I don't think we need to worry about clearing the blocklist when the DNS
cache is cleared. For testing we can simply disable the blocklist. In real
life the blocklist is only 60 seconds and it's unlikely to cause problems
for users.
Differential Revision: https://phabricator.services.mozilla.com/D136531
2022-01-21 18:54:28 +00:00
Manuel Bucher
90522eeeca
Bug 1734579 - Make block size of encrypted edns padding configurable r=necko-reviewers,valentin
...
Additionally changing the paddding block size to the recommended default
of 128 bytes by RFC 8467 Sec 4.1
Differential Revision: https://phabricator.services.mozilla.com/D127957
2021-10-20 07:51:14 +00:00
Valentin Gosu
966339c56f
Bug 1733356 - Fix non-unified build errors in netwerk/dns/ r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D127399
2021-10-14 12:57:58 +00:00
Cosmin Sabou
8d444b25a5
Backed out 10 changesets (bug 1733356, bug 1733922) for causing windows hybrid bustages. CLOSED TREE
...
Backed out changeset 85b747a60e73 (bug 1733922)
Backed out changeset 4af7a3a697ad (bug 1733356)
Backed out changeset 3b2e02c99090 (bug 1733356)
Backed out changeset b481b801250e (bug 1733356)
Backed out changeset 88c33cdcb8aa (bug 1733356)
Backed out changeset 3d31e8c8e194 (bug 1733356)
Backed out changeset 616f676e8f94 (bug 1733356)
Backed out changeset 3f8e9b14879d (bug 1733356)
Backed out changeset 241c7cdb3f6b (bug 1733356)
Backed out changeset 7f9e266070c6 (bug 1733356)
2021-10-14 01:54:30 +03:00
Valentin Gosu
37b7da41fd
Bug 1733356 - Fix non-unified build errors in netwerk/dns/ r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D127399
2021-10-13 19:39:05 +00:00
Cristian Tuns
2be2d6077e
Backed out 10 changesets (bug 1733922, bug 1733356) for causing hybrid build bustages on nsAboutProtocolHandler.cpp. CLOSED TREE
...
Backed out changeset 293ff1a22c98 (bug 1733922)
Backed out changeset b640749ee844 (bug 1733356)
Backed out changeset d2e3dc1b492a (bug 1733356)
Backed out changeset cd6c19829601 (bug 1733356)
Backed out changeset ef8145f88447 (bug 1733356)
Backed out changeset 366e2d375980 (bug 1733356)
Backed out changeset 14563275a25b (bug 1733356)
Backed out changeset 7700cd82bdf2 (bug 1733356)
Backed out changeset 4e198c3d5ef3 (bug 1733356)
Backed out changeset c26481d0f689 (bug 1733356)
2021-10-11 10:02:20 -04:00
Valentin Gosu
6480795f4b
Bug 1733356 - Fix non-unified build errors in netwerk/dns/ r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D127399
2021-10-11 10:40:05 +00:00
Manuel Bucher
3cc3731145
Bug 1543811 - EDNS Padding support for encrypted DNS transports r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D126480
2021-10-07 10:55:21 +00:00
Noemi Erli
55b2633c97
Backed out 3 changesets (bug 1733356) for causing bustages in CookieStorage.cpp CLOSED TREE
...
Backed out changeset e94611929d92 (bug 1733356)
Backed out changeset f1866e615f08 (bug 1733356)
Backed out changeset b87b34fa8a6f (bug 1733356)
2021-10-05 12:57:44 +03:00
Valentin Gosu
822cd925d0
Bug 1733356 - Fix non-unified build errors in netwerk/dns/ r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D127399
2021-10-05 08:22:00 +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
57a5622396
Bug 1709952 - Improve parsing ODoHConfig, r=necko-reviewers,dragana
...
This patch basically uses `span_iterator` to parse the raw data of `ODoHConfig`.
Differential Revision: https://phabricator.services.mozilla.com/D114772
2021-05-18 14:58:00 +00:00
Kershaw Chang
6d57ed5e05
Bug 1698017 - Update ODoH to draft 06, r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D110915
2021-05-10 20:12:09 +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
02a4432e92
Bug 1698015 - Add another way to download ODoHConfigs via https r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D108174
2021-03-19 08:29:14 +00:00
Simon Giesecke
0b443059fd
Bug 1693306 - Simplify some uses of LookupOrInsertWith by GetOrInsertNew. r=xpcom-reviewers,necko-reviewers,dragana,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D105479
2021-02-26 09:22:54 +00:00
Simon Giesecke
4f75368dcb
Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
...
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).
Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +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
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
Simon Giesecke
ca94ec101e
Bug 1691894 - Simplify uses of GetOrInsert where non-default-constructed entries are eventually inserted. r=xpcom-reviewers,necko-reviewers,nika,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D104674
2021-02-15 16:37:52 +00:00
Valentin Gosu
33aa2bcb05
Bug 1691721 - Add DNSPacket::GetRCode and remove TRRSkippedReason argument r=necko-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D99760
2021-02-09 14:22:56 +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
62039bd713
Bug 1688205 - Record TRR_NO_ANSWERS when decoding a DoH response works but it contains no answers r=nhnt11
...
Differential Revision: https://phabricator.services.mozilla.com/D102744
2021-02-05 12:23:46 +00:00
Kershaw Chang
a3582caf5e
Bug 1689474 - Update ODoH to draft-04 and make CNAME work r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D103816
2021-02-04 08:05:45 +00:00
Kershaw Chang
119a94bbef
Bug 1684040 - P3: Encrypt and decrypt DNS packet r=necko-reviewers,kjacobs,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D101684
2021-01-26 17:44:45 +00:00
Kershaw Chang
715197de42
Bug 1684040 - P2: Introduce DNSPacket::DecodeInternal to decode dns packet with an input buffer r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D102402
2021-01-26 14:19:04 +00:00
Kershaw Chang
19e0167786
Bug 1684040 - P1: Introduce new ODoH class for sending ODoH queries r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D101682
2021-01-26 14:19:09 +00:00
Mihai Alexandru Michis
51b7d9634a
Backed out 3 changesets (bug 1684040) for causing bustages in DNSPacket.cpp
...
CLOSED TREE
Backed out changeset 3c771d45563a (bug 1684040)
Backed out changeset 76e79151d53c (bug 1684040)
Backed out changeset 7a993eb7bfde (bug 1684040)
2021-01-26 16:15:12 +02:00
Kershaw Chang
33da037c55
Bug 1684040 - P3: Encrypt and decrypt DNS packet r=necko-reviewers,kjacobs,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D101684
2021-01-26 12:43:03 +00:00
Kershaw Chang
718348d87e
Bug 1684040 - P2: Introduce DNSPacket::DecodeInternal to decode dns packet with an input buffer r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D102402
2021-01-26 12:44:33 +00:00
Kershaw Chang
cffa2368ca
Bug 1684040 - P1: Introduce new ODoH class for sending ODoH queries r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D101682
2021-01-26 12:41:40 +00:00
Brindusan Cristian
6b56eba04b
Backed out changeset d019cef734b8 (bug 1688205) for xpcshell failures at test_trr.js. CLOSED TREE
2021-01-26 10:57:33 +02:00
Valentin Gosu
594cbd671f
Bug 1688205 - Record TRR_NO_ANSWERS when decoding a DoH response works but it contains no answers r=nhnt11
...
Differential Revision: https://phabricator.services.mozilla.com/D102744
2021-01-26 07:40:28 +00:00
Butkovits Atila
fd4c7353ad
Backed out changeset 51936308d0d7 (bug 1688205) for casuing failures on test_trr.js. CLOSED TREE
2021-01-25 15:00:13 +02:00
Valentin Gosu
f8c0d4c144
Bug 1688205 - Record TRR_NO_ANSWERS when decoding a DoH response works but it contains no answers r=nhnt11
...
Differential Revision: https://phabricator.services.mozilla.com/D102744
2021-01-25 11:57:19 +00:00
Kershaw Chang
6051668e53
Bug 1684038 - Add new SVCParam: ODoHConfig r=necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D101683
2021-01-22 12:59:24 +00:00