Title: [231235] trunk/Source/WebKit
- Revision
- 231235
- Author
- [email protected]
- Date
- 2018-05-02 09:42:10 -0700 (Wed, 02 May 2018)
Log Message
Cannot gather srflx or relay ICE candidates on IPv6 network (ICE agent hangs?)
https://bugs.webkit.org/show_bug.cgi?id=181009
<rdar://problem/36144555>
Reviewed by Eric Carlson.
On iOS/IPv6 networks, STUN servers name resolution returns a zero IPv6 IP address.
No error is raised which leads to sending STUN requests with that IP address.
Once the request times out, the ICE candidate gathering finishes with host candidates only.
This patch makes WebRTC DNS resolver to send only IPv4 resolved addresses.
STUN is used for NAT traversal which is for IPv4 addresses.
Not sending IPv6 addresses allows terminating ICE candidate gathering sooner.
Manually tested on iOS with IPv4/IPv6 and IPv6 networks.
* NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp:
(WebKit::resolvedName):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (231234 => 231235)
--- trunk/Source/WebKit/ChangeLog 2018-05-02 16:41:55 UTC (rev 231234)
+++ trunk/Source/WebKit/ChangeLog 2018-05-02 16:42:10 UTC (rev 231235)
@@ -1,5 +1,26 @@
2018-05-02 Youenn Fablet <[email protected]>
+ Cannot gather srflx or relay ICE candidates on IPv6 network (ICE agent hangs?)
+ https://bugs.webkit.org/show_bug.cgi?id=181009
+ <rdar://problem/36144555>
+
+ Reviewed by Eric Carlson.
+
+ On iOS/IPv6 networks, STUN servers name resolution returns a zero IPv6 IP address.
+ No error is raised which leads to sending STUN requests with that IP address.
+ Once the request times out, the ICE candidate gathering finishes with host candidates only.
+
+ This patch makes WebRTC DNS resolver to send only IPv4 resolved addresses.
+ STUN is used for NAT traversal which is for IPv4 addresses.
+ Not sending IPv6 addresses allows terminating ICE candidate gathering sooner.
+
+ Manually tested on iOS with IPv4/IPv6 and IPv6 networks.
+
+ * NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp:
+ (WebKit::resolvedName):
+
+2018-05-02 Youenn Fablet <[email protected]>
+
CacheStorage::Engine should keep a list of initialization callback
https://bugs.webkit.org/show_bug.cgi?id=185184
<rdar://problem/38875651>
Modified: trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp (231234 => 231235)
--- trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp 2018-05-02 16:41:55 UTC (rev 231234)
+++ trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp 2018-05-02 16:42:10 UTC (rev 231235)
@@ -56,8 +56,14 @@
for (size_t index = 0; index < count; ++index) {
CFDataRef data = "" index);
auto* address = reinterpret_cast<const struct sockaddr_in*>(CFDataGetBytePtr(data));
- addresses.uncheckedAppend(WebCore::IPAddress(*address));
+ if (address->sin_family == AF_INET)
+ addresses.uncheckedAppend(WebCore::IPAddress(*address));
+ // FIXME: We should probably return AF_INET6 addresses as well.
}
+ if (addresses.isEmpty()) {
+ resolver->completed(makeUnexpected(WebCore::DNSError::CannotResolve));
+ return;
+ }
resolver->completed(WTFMove(addresses));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes