Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 550f98d6dc5d18e6fe44f56c395e5602cc2f2b4a
      
https://github.com/WebKit/WebKit/commit/550f98d6dc5d18e6fe44f56c395e5602cc2f2b4a
  Author: Youenn Fablet <[email protected]>
  Date:   2026-09-09 (Wed, 09 Sep 2026)

  Changed paths:
    M Source/WebKit/NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm
    M Source/WebKit/NetworkProcess/webrtc/NetworkRTCUtilitiesCocoa.h
    M Source/WebKit/NetworkProcess/webrtc/NetworkRTCUtilitiesCocoa.mm

  Log Message:
  -----------
  NetworkRTCUDPSocketCocoa should not filter AF_UNSPEC remote addresses
rdar://186844205
https://bugs.webkit.org/show_bug.cgi?id=323600

Reviewed by Chris Dumez.

By providing nw_ip_options_set_version, we allow restricting to connecting to 
IPv4 or IPv6 addresses.
When being given an adress with an unresolved name, we do not know whether it 
will be IPv4 or IPv6.
In that case, we should not call nw_ip_options_set_version.
Otherwise, we risk resolving the address but failing to connect as the resolved 
address is not IPv6.

Before the PR, we would call nw_ip_options_set_version, reducing to IPv6 for 
both AF_INET6 and AF_UNSPEC.
We are now correctly restricting to IPv4 for AF_INET, to IPv6 for AF_INET6 and 
we do not restrict for AF_UNSPEC.

This cannot be tested right now that NetworkRTCUDPSocketCocoa only works on 
resolved IP addresses.
A follow-up patch may enable this code path.

* Source/WebKit/NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:
(WebKit::NetworkRTCUDPSocketCocoaConnections::configureParameters):
(WebKit::NetworkRTCUDPSocketCocoaConnections::createNWConnection):
* Source/WebKit/NetworkProcess/webrtc/NetworkRTCUtilitiesCocoa.h:
* Source/WebKit/NetworkProcess/webrtc/NetworkRTCUtilitiesCocoa.mm:
(WebKit::toNWIPVersion):

Canonical link: https://commits.webkit.org/320716@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to