Commit Graph

1162 Commits

Author SHA1 Message Date
Nathan Froyd
dcb8cac432 Bug 1471627 - use a more reasonable stack size for DNS resolver threads; r=valentin
We're maintaining a thread pool, we should be using thread pool stack sizes.
2018-06-27 15:29:12 -04:00
Valentin Gosu
b029385db8 Bug 1470907 - Call AsyncShutdown for threads at the end of nsHostResolver::ThreadFunc r=froydnj
MozReview-Commit-ID: 2M8Qn8KDfdx

--HG--
extra : rebase_source : 5f6f37a630093badae7889ffdd4f10ba4e3d49b7
2018-06-26 02:54:48 +02:00
Daniel Stenberg
4a2731b037 bug 1471217 - ignore the network.dns.get-ttl pref on non-supported systems r=mcmanus
Which is how the pref is documented in all.js

MozReview-Commit-ID: 5ONQgZ1wO5G

--HG--
extra : rebase_source : cdbf5683b12a3bdb889f56c9b4b5037218bedc43
2018-06-26 15:36:26 +02:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Daniel Stenberg
e596152e6c bug 1470093 - fix telemetry::DNS_TRR_LOOKUP_TIME r=mcmanus
MozReview-Commit-ID: 80jrEQ4kLM6

--HG--
extra : rebase_source : 702efbd6dff9615ff827f8c7f05dd8cce2cbd419
2018-06-21 12:02:03 +02:00
Daniel Stenberg
7e7f7eeb34 bug 1463356 do not count "not started" TRR resolves as failures r=mcmanus
... when comparing against the native resolver. DNS_TRR_COMPARE is meant
to compare how the actually performed name resolves fare against each
other.

MozReview-Commit-ID: 98NoUGPpHr6

--HG--
extra : rebase_source : 4042c81da3e5478de26feb7f83c98ee5eb298156
2018-06-20 11:00:19 +02:00
Valentin Gosu
0959b41dd0 Bug 1426019 - Use nsIThread in nsHostResolver r=bagder
MozReview-Commit-ID: LOt7VX9mj7r

--HG--
extra : rebase_source : f66c7282be6c01419d98a216a731fa4bd0a72839
2018-06-18 18:35:16 +02:00
Dorel Luca
b53fbe3617 Merge mozilla-central to autoland 2018-06-15 05:43:31 +03:00
Valentin Gosu
d9800226a5 Bug 1417827 - Pass DNS arguments as nsACString& instead of char* r=bagder
MozReview-Commit-ID: 7Zk0wM2wsJF

--HG--
extra : rebase_source : 6bfe7a9c21d447252db1b0a5351305bdecb0fa3a
2018-06-15 01:15:13 +02:00
Andi-Bogdan Postelnicu
90ac230485 Bug 1453795 - Necko - Initialize member fields in classes/ structures. r=michal 2018-06-14 11:19:07 +03:00
Andrea Marchesini
df966c5c8c Bug 1468503 - Implement nsIEffectiveTLDService.hasRootDomain, r=smaug 2018-06-13 12:29:39 -07:00
Jeff Hemphill
0d0efc9d92 Bug 1417827: Convert internal char* to nsCString in DNS.h r=bagder
MozReview-Commit-ID: Js1mXiKaKnt

--HG--
extra : rebase_source : 55ae6349a65f20a2401aa76711b1e9c871b0c167
2017-11-29 23:30:27 -08:00
Dorel Luca
ff4d587dc8 Backed out 2 changesets (bug 1417827) for windows build bustage. CLOSED TREE
Backed out changeset 35655153f9c9 (bug 1417827)
Backed out changeset 9606d0d95b53 (bug 1417827)

--HG--
extra : amend_source : ce9a86c7b5ded39d1b00a7c626ba7a082efaabde
2018-06-14 22:07:18 +03:00
Valentin Gosu
e5efdc876d Bug 1417827 - Pass DNS arguments as nsACString& instead of char* r=bagder
MozReview-Commit-ID: GqNYfjy9SFp

--HG--
extra : source : 190c4f057ffafa28a9abec657a0c70fe8a9489ab
2018-06-14 14:30:40 +02:00
Jeff Hemphill
deb1d4dff1 Bug 1417827: Convert internal char* to nsCString in DNS.h r=bagder
MozReview-Commit-ID: Js1mXiKaKnt

--HG--
extra : source : fc388a747aba88d3eb535e6105305bd85914600b
2017-11-29 23:30:27 -08:00
Gurzau Raul
f2d3a45d49 Backed out 2 changesets (bug 1417827) backed out due to gecko decision task failure, tests did not run
Backed out changeset 190c4f057ffa (bug 1417827)
Backed out changeset fc388a747aba (bug 1417827)
2018-06-14 19:07:48 +03:00
Valentin Gosu
3620424d66 Bug 1417827 - Pass DNS arguments as nsACString& instead of char* r=bagder
MozReview-Commit-ID: GqNYfjy9SFp

--HG--
extra : rebase_source : 6bd7c4fcb1f6a5bbbaa9654907ce1b1224be64b2
2018-06-14 14:30:40 +02:00
Jeff Hemphill
85150abc1d Bug 1417827: Convert internal char* to nsCString in DNS.h r=bagder
MozReview-Commit-ID: Js1mXiKaKnt

--HG--
extra : rebase_source : 835ab465653aef0d9d513b8836ba54a27b98e556
2017-11-29 23:30:27 -08:00
Daniel Stenberg
a69516185c bug 1466777 - make TRR failures pass on "unknown host" status r=valentin
MozReview-Commit-ID: HamTaGeZSzw

--HG--
extra : rebase_source : 1f6a46ad77fd071801b68d7ced03b2604fb147a0
2018-06-05 11:20:05 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Daniel Stenberg
5fb821ffc0 bug 1463452 - lock the resolver in GetDNSCacheEntries r=valentin
MozReview-Commit-ID: AGQW8KcRlwb

--HG--
extra : rebase_source : 820569097cbe84f67fafe2ecfdcf10dbbeb5332c
2018-05-22 17:29:34 +02:00
Patrick McManus
f18aa94399 Bug 1462357 - remove the channel and socket interface id r=bagder,baku
the id was a b2g feature only settable via chrome privd xhr and is no
longer active in the code base

MozReview-Commit-ID: 84GPNvhvjNb

--HG--
extra : rebase_source : ab5c2229b98e1407b8b74ef2ee00dcfea45e046a
2018-05-16 16:05:03 -04:00
Daniel Stenberg
06c7a72bf8 bug 1460327 - make the DNS packet decoder verify the answer qname r=mcmanus
... and before chasing a cname, check if the address record for that
CNAME is actually in fact already provided in the DNS packet that passed
on the CNAME!

Some existing tests ajusted for this. Two new tests added.

MozReview-Commit-ID: CBMO7N7jMEX

--HG--
extra : rebase_source : 1110a8df6d89fcbb0ad2a35b3762b837ce7a1e18
2018-05-08 19:30:07 +02:00
Patrick McManus
b6c1ea5823 Bug 1461182 reduce nsHostRecord overhead by about 40 bytes r=bagder
MozReview-Commit-ID: DvmJE5LcDwQ

--HG--
extra : rebase_source : dd06d83231a4c7fb187f68b34573b115bb82322e
2018-05-12 14:36:26 -07:00
Daniel Stenberg
7edaccb568 Bug 1460589 - Add DNS vs TRR success/fail telemetry counter. r=mcmanus 2018-05-10 07:02:00 -04:00
Daniel Stenberg
b91a1dbbc5 Bug 1460305 - Add DNS_PREMATURE_EVICTION telemetry probe. r=mcmanus
Counts age of non-expired DNS cache entries being evicted.
2018-05-10 06:20:00 -04:00
Daniel Stenberg
ced57782d6 Bug 1460330 - Always use use TTL with TRR. r=mcmanus 2018-05-10 06:32:00 -04:00
Daniel Stenberg
4f75cae7c6 Bug 1452436 - Callback when resolving a host already in progress. r=mcmanus
If a callback has already been called for the hostrecord, it is
partially resolved already by TRR so the new callback should be called
at once.
2018-05-10 05:36:00 -04:00
Jason Duell
edbb85e76e Bug 1459882 - Manually update the public suffix list. r=valentin
--HG--
extra : rebase_source : 4a869a15dd0e2ebfa4b6711e2010ded401ecc9e6
2018-05-08 04:36:00 -04:00
Daniel Stenberg
cc57e08b25 bug 1450630 - use DataStorage in main thread only r=mcmanus
Move the TRR blacklist check to the main thread, and since it is now
done a little later and for each separate request, make sure to only do
the telemetry counting for one of the record types (A) so that we don't
count them twice.

MozReview-Commit-ID: BgvU4TzrpCq

--HG--
extra : rebase_source : 304bc75a6f22963b51e89034de1b30506337b6ec
2018-04-30 09:08:07 +02:00
Andi-Bogdan Postelnicu
3f2298c2f6 Bug 1457411 - Update netwerk module to make use of newer methods introduced with c++11 and c++14. r=valentin
MozReview-Commit-ID: 666LNaHyiuQ

--HG--
extra : rebase_source : f3a24e0342d8dcdf9020dd473bc6b1045cbc533b
2018-04-30 19:46:04 +03:00
Kris Maglione
a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Daniel Stenberg
c128322997 bug 1457005 - TRR: reset confirmation state machine on prefs update r=mcmanus
If the confirmation state machine has gone into FAILED mode, updated
prefs is reason enough to try again and possibly get TRR verified
proper.

MozReview-Commit-ID: ALRbNJdvxdn

--HG--
extra : rebase_source : 8ad0a7d74d570228db17d91c1f5127b0524117a8
2018-04-26 00:07:31 +02:00
Daniel Stenberg
af8824af35 bug 1455972 - make TRR prefer address responses to CNAME r=mcmanus
In a DOH response to a query asking for an A or AAAA record, a CNAME
response is often accompanied by A/AAAA resources as well. With this
change, TRR now rather use those address records than following the
CNAME record. This saves name resolver round-trips.

MozReview-Commit-ID: GcjZj5Ehz68

--HG--
extra : rebase_source : b80d9818cb8fa6139feeeec3d2fb11a5b800ee48
2018-04-23 11:26:04 +02:00
Daniel Stenberg
8d35551b70 bug 1454941 - revert CP wait fix from bug 1451150 r=valentin
... but keep the logic that avoids re-initialization.

MozReview-Commit-ID: 2XQCRaM6U4B

--HG--
extra : rebase_source : e7291b3c7b26d39dcfde445212dd4f10b63ec98d
2018-04-18 15:21:14 +02:00
Daniel Stenberg
c0dc0efdd6 bug 1454307 - revert TRR telemetry histogram label addition r=mcmanus
It isn't supported server side, so make the TRRoff mode instead count
as nativeonly.

MozReview-Commit-ID: 73si3kam6xU

--HG--
extra : rebase_source : 2869fc515ffb23303bdf2fc5e231d0edc62193e7
2018-04-16 09:49:34 +02:00
Daniel Stenberg
01a7750519 bug 1453825 - add telemetry for TRR NS confirmation checks r=mcmanus
MozReview-Commit-ID: 3FAdEhlH5VI

--HG--
extra : rebase_source : fb1762a5b1863da0cbe568c087543384b2aba14a
2018-04-13 00:47:45 +02:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Daniel Stenberg
9ad6beb28d bug 1453822 - TRR: add a mode for "explicitly turned off" r=mcmanus
... as opposed to off by default.

MozReview-Commit-ID: EClrW33xGkb

--HG--
extra : rebase_source : aa8de07950f0da41eb8136894b119308b0450319
2018-04-13 00:32:04 +02:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Nathan Froyd
7bb7ffd8c9 Bug 1453134 - part 1 - add a string input stream constructor that accepts move references; r=baku
This method is more efficient when we know we're not going to need the
string afterwards, and should cut down on intermediate allocations.
2018-04-11 10:06:17 -04:00
Nika Layzell
0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Daniel Stenberg
d8d095de79 bug 1451883 - fix pointer handling in the DOH response decoding r=mcmanus
In the section of the response body parser that just skips over the
answer section, the code wrongly assumed there could only be a pointer
at the start, while in fact every label can be made as a pointer. Just
turned out to not be used very often.

MozReview-Commit-ID: 8ZYtlq8HDPw

--HG--
extra : rebase_source : cc790caf36b4d4e77b113f89ed427ee537a539d8
2018-04-05 23:28:26 +02:00
Daniel Stenberg
c9bc3d9398 bug 1452568 - inhibit cache use when doing TRR in PB r=valentin
MozReview-Commit-ID: MmdSMBdH4v

--HG--
extra : rebase_source : 7e4c2ed2b38d2255d24e5e67ace22a3fe1ec9a3c
2018-04-09 12:14:28 +02:00
Daniel Stenberg
11c34a5b83 bug 1451928 - loop detection added for the TRR CNAME parser r=valentin
MozReview-Commit-ID: 8vLjS7hOYKU

--HG--
extra : rebase_source : 69b82c3df7db7d19f0667e9de0c6c67b7c7794fe
2018-04-06 00:47:15 +02:00
Daniel Stenberg
7ca074617e bug 1451750 - treat rrsets from different resolvers as different r=mcmanus
... even if all the addresses are identical.

Otherwise the IsTRR() bit would be dropped, resulting in
about:networking showing false for this entry while in reality being
TRR. Or vice versa.

MozReview-Commit-ID: JABLm09iCnn

--HG--
extra : rebase_source : 24f9ff8b6818c00359069add23d1354ab2f1b1f9
2018-04-05 16:30:10 +02:00
Daniel Stenberg
695dbf5db9 bug 1451150 - make TRRService wait for the correct CP event r=valentin
MozReview-Commit-ID: LwBjw7EKBhR

--HG--
extra : rebase_source : 404f132e48b1c57a3b93cc1efcd64a16a425f32b
2018-04-04 00:16:55 +02:00
Daniel Stenberg
e443c66c37 bug 1447642 - no more DNSService restarts r=valentin
The DNS service was shutdown and restarted again in several scenarios,
for example when one of its prefs changed and by nsIOService when going
offline/online. The DNSService restart dragged the resolver, TRRService
and others with it and they too were thus restarted.

Most notably this hurt TRR resolving, as the restart caused short gaps
in time when there was no TRRService available and nsHostResolver
defaults to TRR Mode "native" if there's no TRRservice up, causing the
name resolver to occasionally use the wrong or unexpected resolver even
though TRR is enabled.

The resolver restart also flushed the DNS cache which is now avoided.

It is also a performance gain.

MozReview-Commit-ID: pp4Y8bNQJk

--HG--
extra : rebase_source : 9e3b3e6c0df16b8ca6287d8045f594026ae9ad6d
2018-03-21 14:35:53 +01:00
Daniel Stenberg
144d65c4d6 bug 1446749 - make resolver keep TRR status when cherry-picking adddresses r=mcmanus
... as they otherwise appear in the about:networking list as "false"
while having been resolved by TRR.

MozReview-Commit-ID: 9g9fUExvyjS

--HG--
extra : rebase_source : 3098b7c3f7d01e55f5a8c031fc6a73e53f7edb05
2018-03-18 15:39:56 +01:00
Daniel Stenberg
75ba9a2870 bug 1446352 TRR: make "only mode" not wait for CP confirmation r=mcmanus
... to avoid a catch-22 as CP needs name resolve to work.

MozReview-Commit-ID: DC1CjlUy4cJ

--HG--
extra : rebase_source : 3bc0f146071f04757d44b76f352e48b2abb4dad0
2018-03-17 19:56:12 +01:00