Bug 181009

Summary: Cannot gather srflx or relay ICE candidates on IPv6 network (ICE agent hangs?)
Product: WebKit Reporter: Mark Roberts <mroberts>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: adam, commit-queue, eric.carlson, svein, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 11   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Mark Roberts 2017-12-19 16:25:32 PST
It appears that Safari (iOS and maybe macOS) may not be able to gather srflx and relay candidates from an IPv6 network.

Reproduction Steps:

1. Load https://jsfiddle.net/rn8b6y0k/1/ in Safari from an IPv6 network.*
2. Click "Test without getUserMedia".

Expected Results:

  At least one srflx candidate is gathered.

Actual Results:

  No ICE candidates are gathered, "null candidate" is never received, and ICE connection state does not change.

* I tested using Safari on iOS with T-Mobile. I also tested Safari on macOS connected through my iPhone's T-Mobile hotspot. I got mixed results through the T-Mobile hotspot (I'm not sure why). My colleague tried the same test on iOS using AT&T, and it worked for him.

---

If you re-run this test with Chrome on macOS, it will succeed.
Comment 1 youenn fablet 2017-12-19 16:35:24 PST
I can reproduce the bug as well.
Comment 2 Radar WebKit Bug Importer 2017-12-19 16:38:34 PST
<rdar://problem/36144555>
Comment 3 sventy 2017-12-20 03:33:55 PST
If a device has both an IPv4 address and an IPv6 address, will this issue affect both?

In other words: Are no srflx and relay candidates gathered if the host is on a IPv6 network or does the issue affect only the IPv6 address?
Comment 4 youenn fablet 2017-12-20 09:32:32 PST
(In reply to sventy from comment #3)
> If a device has both an IPv4 address and an IPv6 address, will this issue
> affect both?

Both host IPv4 and IPv6 should be gathered according my testing.

> In other words: Are no srflx and relay candidates gathered if the host is on
> a IPv6 network or does the issue affect only the IPv6 address?

I would think this only affects the IPv6 addresses.
My testing is limited at the moment though.
Comment 5 youenn fablet 2018-03-15 16:06:18 PDT
To be noted that on that page, stun.l.google.com is used and does not have any IPV6 address. It seems therefore strange that a srflx candidate would be gathered.

That said, we should not be timing out.
Maybe the DNS resolution is timing out and we do not properly handle this error case.
Or we are getting an IPv4 address and do not handle it properly.
Comment 6 youenn fablet 2018-05-01 14:22:12 PDT
Created attachment 339224 [details]
Patch
Comment 7 WebKit Commit Bot 2018-05-02 09:42:15 PDT
Comment on attachment 339224 [details]
Patch

Clearing flags on attachment: 339224

Committed r231235: <https://trac.webkit.org/changeset/231235>
Comment 8 WebKit Commit Bot 2018-05-02 09:42:17 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Mark Roberts 2018-07-24 10:54:04 PDT
Thanks, Youenn. I haven't seen this mentioned in any recent Safari Tech Preview release notes. Is it out yet?
Comment 10 youenn fablet 2018-08-13 13:02:25 PDT
(In reply to Mark Roberts from comment #9)
> Thanks, Youenn. I haven't seen this mentioned in any recent Safari Tech
> Preview release notes. Is it out yet?

The patch should be out since quite some time on Safari Tech Preview and is probably in latest Mac/iOS betas.