Closed
Bug 1286636
Opened 9 years ago
Closed 9 years ago
[FlyWeb] Use unbound UDP socket for mDNS queries
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: djvj, Assigned: djvj)
References
Details
(Whiteboard: [necko-active])
Attachments
(1 file, 1 obsolete file)
10.76 KB,
patch
|
justindarc
:
review+
|
Details | Diff | Splinter Review |
One of the implementation issues we ran into on Windows 10 is that win10 system processes open and hold UDP port 5353 on the mDNS multicast address.
Our current fallback implementation also uses a SO_REUSE UDP socket on port 5353, but is hampered by conflicts. The main issue is that only broadcast packets sent to the multicast group are delivered to the gecko UDP socket. Directed UDP messages to the machine on that port are not delivered, and presumably go to the system socket instead.
The workaround suggested is to use a single query socket opened on an arbitrary port. The query socket does NOT join the mDNS multicast IP group, but DOES send packets to that group. Since this socket is assigned its own unique port, query responses addressed to it will resolve properly.
Assignee | ||
Comment 1•9 years ago
|
||
Tested this on Linux, Android, and my Win10 box. Seems to work quite well.
Attachment #8770685 -
Flags: review?(jdarcangelo)
Updated•9 years ago
|
Assignee: nobody → kvijayan
Whiteboard: [necko-active]
Comment 2•9 years ago
|
||
Comment on attachment 8770685 [details] [diff] [review]
use-unbound-query-socket.patch
Review of attachment 8770685 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM. See my comment about removing the old block of commented-out code.
::: netwerk/dns/mdns/libmdns/fallback/MulticastDNS.jsm
@@ +343,5 @@
> sockets.forEach((socket) => {
> socket.send(MDNS_MULTICAST_GROUP, MDNS_PORT, data, data.length);
> });
> });
> + */
We should probably just remove this block instead of commenting it out.
Attachment #8770685 -
Flags: review?(jdarcangelo) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Updated patch.
Attachment #8770685 -
Attachment is obsolete: true
Attachment #8771453 -
Flags: review?(jdarcangelo)
Updated•9 years ago
|
Attachment #8771453 -
Flags: review?(jdarcangelo) → review+
Pushed by kvijayan@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/048a09249037
Use dedicated custom-port query socket to do mDNS queries. Respond to queries using per-interface sockets. r=justindarc
Comment 5•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Comment 6•9 years ago
|
||
this caused a small perf improvement on android (nexus 4.1: https://treeherder.mozilla.org/perf.html#/alerts?id=2167 ):
Summary of tests that improved:
remote-blank summary android-4-2-armv7-api15 opt - 2.08% better
thanks for the win!
You need to log in
before you can comment on or make changes to this bug.
Description
•