Support mDNS queries in mdns_service
Categories
(Core :: WebRTC: Networking, enhancement, P2)
Tracking
()
People
(Reporter: dminor, Assigned: dminor)
References
(Blocks 1 open bug)
Details
Attachments
(11 files, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
Bug 1554976 is adding a Rust mdns_service to respond to mDNS queries. We'll need to expand that service to also support generating queries as some versions of Windows do not support mDNS and the necko DNS code relies upon the operating system to handle queries.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Try job with green test runs on desktop platforms: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d7100a10b8abfe4a4e40f2a5ff895789d41c8a07
Assignee | ||
Comment 3•5 years ago
|
||
Another try run hitting a wider range of builds: https://treeherder.mozilla.org/#/jobs?repo=try&revision=0571b42eb329ca12d8275bbe011ddca7a74ad9ab
The build fails on mingw opt builds. Part of this change is adding an extern "C" callback from Rust back to C++. The mingw builds are --disable-webrtc and on the opt builds, it is complaining that the callback is undefined. I'm guessing the callback implementation in C++ is being optimized away as the debug builds are working. It would be nice to not build mdns_service for --disable-webrtc builds, but I'm not sure if that is possible. Nathan, do you have any suggestions on how to handle this? Thanks!
Comment 4•5 years ago
|
||
Only building mdns_service
for --enable-webrtc
builds should be pretty straightforward; you need to set up some feature hereabouts:
https://searchfox.org/mozilla-central/source/toolkit/library/rust/gkrust-features.mozbuild
something like:
if CONFIG['MOZ_WEBRTC']:
gkrust_features += ['mdns']
(or webrtc, or whatever you want to call the feature). You'll need to add it to:
https://searchfox.org/mozilla-central/source/toolkit/library/rust/Cargo.toml
https://searchfox.org/mozilla-central/source/toolkit/library/gtest/rust/Cargo.toml
as well and propagate the feature down into:
https://searchfox.org/mozilla-central/source/toolkit/library/rust/shared/Cargo.toml
where mdns
would enable the mdns_service
dependency (mdns_service
would also become optional at that point). You'd also need to modify:
https://searchfox.org/mozilla-central/source/toolkit/library/rust/shared/lib.rs#53
to be guarded with the appropriate #[cfg(feature = "mdns")]
And that should be all you need.
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
Assignee | ||
Comment 7•5 years ago
|
||
This adds basic query support to the mdns_service. Support for limiting
the number of pending queries, timeouts and retries is added in
another commit in this series.
Depends on D46974
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D46975
Assignee | ||
Comment 9•5 years ago
|
||
Depends on D46976
Assignee | ||
Comment 10•5 years ago
|
||
We don't want web content to use mDNS to map out the local network, so
we only support registering and querying hostnames that are valid
UUIDs (followed by .local).
Depends on D46977
Assignee | ||
Comment 11•5 years ago
|
||
This limits the number of pending mDNS queries to 50, adds support for
retrying queries if they timeout, and support for reporting failure if a query
times out twice in a row.
Depends on D46978
Assignee | ||
Comment 12•5 years ago
|
||
This adds Rust unit tests for some of the edge cases in handling queries
like limits and retries.
Depends on D46979
Assignee | ||
Comment 13•5 years ago
|
||
We need to join the multicast group on all network interfaces or we may end up
missing packets. There is a limit on the number of groups joinable by a single
socket (20 on my Linux system) but it doesn't seem worth worrying about
hitting that limit at the moment as it seems unlikely that many users would
have more than 20 network interfaces on a system on which they are running
Firefox.
Depends on D46980
Assignee | ||
Comment 14•5 years ago
|
||
According to https://tools.ietf.org/html/draft-ietf-rtcweb-mdns-ice-candidates-03#section-3.1.2.1
we need to hide the rel-addr and rel-port attributes for server reflex
candidates in order to avoid leaking local addresses.
Depends on D46981
Assignee | ||
Comment 15•5 years ago
|
||
If there are multiple pending queries, this allows up to five of them to be
sent in a single packet. This also adds a check to ensure we don't already have
a pending query for a hostname prior to sending a new query.
Depends on D46982
Assignee | ||
Comment 16•5 years ago
|
||
Depends on D46983
Assignee | ||
Comment 17•5 years ago
|
||
Depends on D46984
Assignee | ||
Comment 18•5 years ago
|
||
Because this missed the deadline for QA for Firefox 71, I'm going to land this preffed off in 71 and flip the pref early in 72.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 19•5 years ago
|
||
Comment 20•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/be237496f41e
https://hg.mozilla.org/mozilla-central/rev/2afa8a8a0445
https://hg.mozilla.org/mozilla-central/rev/b2f61006436d
https://hg.mozilla.org/mozilla-central/rev/6f29bc4ed952
https://hg.mozilla.org/mozilla-central/rev/fc0a313fa8e2
https://hg.mozilla.org/mozilla-central/rev/9f849d55a360
https://hg.mozilla.org/mozilla-central/rev/87443564bb2a
https://hg.mozilla.org/mozilla-central/rev/ddc6931cddec
https://hg.mozilla.org/mozilla-central/rev/c45a8001b0a1
https://hg.mozilla.org/mozilla-central/rev/570b2370189e
https://hg.mozilla.org/mozilla-central/rev/d93156659b1b
Updated•5 years ago
|
Description
•