Closed
Bug 1218660
Opened 10 years ago
Closed 6 years ago
Only accept IPv4 address in DNSServiceGetAddrInfoReply callback
Categories
(Core :: Networking: DNS, defect, P5)
Tracking
()
RESOLVED
WONTFIX
| Tracking | Status | |
|---|---|---|
| firefox44 | --- | affected |
People
(Reporter: kershaw, Assigned: kershaw)
References
Details
(Whiteboard: [necko-would-take])
Attachments
(1 file)
|
4.08 KB,
patch
|
schien
:
feedback-
|
Details | Diff | Splinter Review |
DNSServiceGetAddrInfoReply[1] will be invoked multiple times for getting both IPv4 and IPv6 addresses, but we didn't handle it well. We decide to only handle IPv4 currently.
[1] https://dxr.mozilla.org/mozilla-central/source/netwerk/dns/mdns/libmdns/MDNSResponderOperator.cpp#738
| Assignee | ||
Comment 1•10 years ago
|
||
SC, Gary,
Could you please take a look first?
Assignee: nobody → kechang
Attachment #8679292 -
Flags: feedback?(xeonchen)
Attachment #8679292 -
Flags: feedback?(schien)
Comment 2•10 years ago
|
||
Comment on attachment 8679292 [details] [diff] [review]
[WIP] Only get IPv4 address
Review of attachment 8679292 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/mdns/MulticastDNSManager.java
@@ +532,5 @@
> return;
> }
>
> + // NOTE: We only accept IPv4 address currently.
> + if (serviceInfo.getHost() instanceof Inet6Address) {
Based on the comment, I'll prefer to check Inet4Address.
::: netwerk/dns/mdns/libmdns/MDNSResponderOperator.cpp
@@ -745,5 @@
> {
> MOZ_ASSERT(GetThread() == NS_GetCurrentThread());
>
> - mDeleteProtector = nullptr;
> -
This should be moved to somewhere else rather than being deleted, right?
@@ +754,5 @@
>
> if (!mListener) { return; }
>
> + // If the address is valid, kDNSServiceFlagsAdd must be set. Also
> + // check kDNSServiceFlagsMoreComing is not set to get the last address.
I'm not sure the reason here that only the last address is got.
Attachment #8679292 -
Flags: feedback?(xeonchen)
Comment 3•10 years ago
|
||
Comment on attachment 8679292 [details] [diff] [review]
[WIP] Only get IPv4 address
Review of attachment 8679292 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry I got a second thoughts after our discussion. MDNS is designed to be a general XPCOM, not only for Presentation API. Making Presentation API works for multiple callback or reporting multiple address in one callback will be the long term solution.
Attachment #8679292 -
Flags: feedback?(schien) → feedback-
Updated•10 years ago
|
Whiteboard: [necko-would-take]
Comment 4•9 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
| Assignee | ||
Comment 5•6 years ago
|
||
I think MDNS is not used now, so close this.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•