Closed Bug 1218660 Opened 10 years ago Closed 6 years ago

Only accept IPv4 address in DNSServiceGetAddrInfoReply callback

Categories

(Core :: Networking: DNS, defect, P5)

ARM
Gonk (Firefox OS)
defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox44 --- affected

People

(Reporter: kershaw, Assigned: kershaw)

References

Details

(Whiteboard: [necko-would-take])

Attachments

(1 file)

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
Blocks: 1217807
SC, Gary, Could you please take a look first?
Assignee: nobody → kechang
Attachment #8679292 - Flags: feedback?(xeonchen)
Attachment #8679292 - Flags: feedback?(schien)
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 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-
Whiteboard: [necko-would-take]
Priority: -- → P5

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.

Attachment

General

Created:
Updated:
Size: