| Owners-Override | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Bot-Commit | +1 |
| Commit-Queue | +2 |
Revert "Add SSM support to Direct Sockets API (services/network and Blink layers)"
This reverts commit 030237772913cd7805c13962d9a50b145c7ba90d.
Reason for revert: Suspicious about causing test failures of
ChromeDirectSocketsUdpIsolatedWebAppMulticastTest.MulticastJoinGroupSSMSameGroupDifferentSources
https://ci.chromium.org/ui/p/chromium/builders/ci/mac15-x64-rel-tests/15107/overview
Original change's description:
> Add SSM support to Direct Sockets API (services/network and Blink layers)
>
> https://chromestatus.com/feature/6208452397498368
>
> Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/692dffe2.050a0220.17ec37.0673.GAE%40google.com
>
> Implement Source-Specific Multicast (SSM) support in the Network Service
> and Blink renderer layers, building on the net/socket foundation to
> expose SSM capabilities to isolated web applications through the Direct
> Sockets API.
>
> Network Service Layer (services/network):
> - Extend the RestrictedUDPSocket Mojo interface with an optional source_address
> - Update UDPSocket and RestrictedUDPSocket to pass source filtering parameters
> - Add SSM support to test mocks (TestRestrictedUDPSocket)
>
> Blink Renderer Layer (third_party/blink):
> - Add MulticastController interface for managing group memberships
> - Implement joinGroup()/leaveGroup() with optional source filtering
> - Add MulticastMembership dictionary for SSM (group, source) pairs
> - Validate multicast addresses (IPv4: 224.0.0.0/4, IPv6: ff00::/8)
> - Prevent mixing ASM and SSM for the same group
> - Track active memberships with automatic cleanup on socket close
> - Add joinedGroups() attribute for introspection
>
> Testing:
> - Add 15 MulticastController unit tests (8 ASM + 7 SSM)
>
> ---
>
> Previous CI failures and fixes (PS99 → current PS):
>
> Platforms: fuchsia-x64-cast-receiver-rel, linux-chromeos-rel, linux-rel,
> linux_chromium_asan_rel_ng, linux_chromium_tsan_rel_ng, mac-rel, win-rel
>
> Root cause: FakeRestrictedUDPSocket in multicast_controller_unittest.cc did
> not track source_address in JoinGroup(), so last_join_source_address()
> .has_value() was always false.
>
> Fix: FakeRestrictedUDPSocket::JoinGroup now stores source_address in
> last_join_source_address_. Full Blink->Mojo plumbing:
> - multicast_controller.idl/.h/.cc: joinGroup() accepts
> MulticastGroupOptions.sourceAddress, parses it, passes it to
> RestrictedUDPSocket::JoinGroup
> - restricted_udp_socket.mojom: JoinGroup gains net.IPAddress? source_address
> - restricted_udp_socket.cc: forwards source_address to UDPSocket::JoinGroup
> - udp_socket.cc: calls JoinSourceGroup() (SSM) vs JoinGroup() (ASM) based
> on source_address
>
> Tests: MulticastJoinGroupSSMSameGroupDifferentSources, MulticastJoinLeaveGroupSSM
> Platforms: linux-chromeos-rel, linux-rel, linux-js-coverage-rel
>
> Root cause: MCAST_JOIN_SOURCE_GROUP / MCAST_LEAVE_SOURCE_GROUP were not in
> the BPF setsockopt allowlist for the network service sandbox. Any SSM
> setsockopt call hit CrashSIGSYSSockopt(), killing the process.
>
> Fix: crrev.com/c/7641869 -- MCAST_JOIN_SOURCE_GROUP and
> MCAST_LEAVE_SOURCE_GROUP added to both the IPv4 and IPv6 setsockopt case
> lists in RestrictSetSockoptForNetworkService().
>
> Tests: JoinGroupSSM, JoinGroupSSMSameGroupDifferentSources,
> JoinGroupSSMTwiceWithSameSource, LeaveGroupSSMMustMatchSource
> Platforms: linux-chromeos-rel, linux-rel
>
> Root cause: Same seccomp crash as above. content_browsertests reports the
> process kill as "failed" rather than "crashed".
>
> Fix: Same -- crrev.com/c/7641869.
>
> Root cause: Old patchset used a non-locally-routable address (192.0.2.1,
> TEST-NET-1) as the second source. macOS's GetInterfaceForDestination uses
> connect() to find the outgoing interface; with a non-routable destination it
> returns interface index 0, causing MCAST_JOIN_SOURCE_GROUP to fail.
>
> Fix: direct_sockets_udp_browsertest.cc -- source2 is now constructed by
> toggling the last byte of source1 (a real local address), giving a
> same-subnet address that IS routable via the same interface. The stale
>
> Platforms: linux-chromeos-rel, linux-rel, linux_chromium_asan_rel_ng,
> mac-rel, win-rel
>
> Root cause: Old patchset added ERR_INVALID_ARGUMENT -> NotSupportedError to
> CreateDOMExceptionCodeAndMessageFromNetErrorCode in socket.cc (intended for
> SSM IP-version mismatch). Port 0 is rejected by MockUDPSocket with
> ERR_INVALID_ARGUMENT, so the test received "NotSupportedError" but expected
> HasSubstr("NetworkError").
>
> Fix: socket.cc -- the ERR_INVALID_ARGUMENT case is removed. Port 0 now
> falls through to default -> NetworkError. IP-version mismatch for SSM is
> caught at the Blink validation layer in multicast_controller.cc before
> reaching the network service, so the removed case was effectively dead.
>
> Bug: 461262401
> Change-Id: Ia399ebcdbae425b1b89089eb5bcebbc5e8fa8d45
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7186747
> Reviewed-by: Reilly Grant <rei...@chromium.org>
> Reviewed-by: Tom Sepez <tse...@chromium.org>
> Reviewed-by: Muyao Xu <muy...@google.com>
> Commit-Queue: Reilly Grant <rei...@chromium.org>
> Reviewed-by: Andrew Rayskiy <green...@google.com>
> Reviewed-by: Jordan Bayles <jop...@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1597329}
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |