Closed Bug 1609124 Opened 5 years ago Closed 5 years ago

ICE mode 2 implementation on dual stack configurations is prone to fail

Categories

(Core :: WebRTC: Networking, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox74 --- wontfix
firefox75 --- wontfix
firefox76 --- fixed

People

(Reporter: lgrahl, Assigned: mjf)

References

Details

(Whiteboard: [wfh])

Attachments

(1 file)

The current ICE mode 2 implementation (aka gather default interface addresses) often leads to ICE failures or unnecessary bad connections on dual stack configurations.

When a website has been received via IPv6, only the IPv6 address of the default interface is being used. This breaks host-to-host connections that would have been possible via IPv4. In addition to that, it lets ICE fail completely when STUN/TURN servers are not reachable by IPv6.

The same applies to IPv4: When a website has been received via IPv4, only the IPv4 address of the default interface is being used. This breaks host-to-host connections that would have been possible via IPv6. In addition to that, it lets ICE fail completely when STUN/TURN servers are not reachable by IPv4.

The current implementation violates draft-ietf-rtcweb-ip-handling sec 5.2:

Once an interface has been chosen, the private IPv4
and IPv6 addresses associated with this interface MUST be
discovered and provided to the application. This ensures
that direct connections can still be established in this
mode.

Proposed solution: Resolve the interface that shipped the website and gather all addresses of that interface.


Background: For Threema Web, we have removed AAAA records for our STUN/TURN servers as part of an optimisation. Due to this, if our website has been shipped via IPv6, Firefox refuses to contact our TURN servers even though it is perfectly capable to do so. While investigating, we found out the above mentioned behaviour.

Thanks for the report. Right now, we are indeed simply using the IP address the origin was loaded with. I agree that we should be attempting to take that IP address, find its interface, and obtain the rest of the addresses on it.

Priority: -- → P3

If I remember correctly, I ran into this while testing some stuff out before Christmas. As far as I can tell, this changed with Bug 1506219, which added code here [1] that only checks for ipv4 or ipv6. For the site I was testing, we were hitting the top branch of the if statement and only getting one of ipv4 or ipv6.

[1] https://searchfox.org/mozilla-central/rev/9e45d74b956be046e5021a746b0c8912f1c27318/media/mtransport/third_party/nICEr/src/ice/ice_ctx.c#737

So now, we just ask "What did we use to load this origin?", and don't try to interrogate the networking code at all.

FWIW: We regard this as a serious bug and as a company running on WebRTC, it's a reason for us to tell our users to move to another browser for their WebRTC applications. It would be great to get this fixed asap. Thanks.

Byron: does that mean that this is fixed?

No. Right now, if we have a network interface with multiple IP addresses on it (eg; a V4 and V6), and we load an origin with the V4 address, we do not gather the V6 address from the same interface. We need some way of asking necko "What interface was this origin loaded with, and what are the IP addresses associated with this interface?"

I guess we could also do this down in nICEr...

My plan is to start looking at this later today.

Assignee: nobody → mfroman
Pushed by mfroman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c6cfb1f684cc check for associated IP address on interface for ICE dualstack operation. r=bwc
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

Regressions: 1626814
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: