Skip to content

Commit ef7db8d

Browse files
lewingCopilot
andauthored
[release/9.0] Disable Datagram_UDP_AccessDenied_Throws_DoesNotBind on all macOS/MacCatalyst (#125568)
## Summary macOS 15+ returns `EHOSTUNREACH` instead of `EACCES` for UDP broadcast without `SO_BROADCAST` due to Apple's [Local Network privacy feature](https://developer.apple.com/forums/thread/765285). The test expects `SocketError.AccessDenied` but gets `SocketError.HostUnreachable`. The existing `ActiveIssue` (from #113313) only disabled on MacCatalyst x64. The failure affects all macOS 15+ platforms — confirmed on `osx.15.amd64` in both coreclr and Mono legs in [#125564](#125564). ## Change Broadens the `ActiveIssue` from: ```csharp [ActiveIssue("...", typeof(PlatformDetection), nameof(PlatformDetection.IsMacCatalyst), nameof(PlatformDetection.IsX64Process))] ``` to: ```csharp [ActiveIssue("...", TestPlatforms.OSX | TestPlatforms.MacCatalyst)] ``` @ManickaP requested this backport in #114450 (comment). Fixes #114450 on release/9.0. cc @liveans @kotlarmilos @ManickaP Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 76cf203 commit ef7db8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/libraries/System.Net.Sockets/tests/FunctionalTests

src/libraries/System.Net.Sockets/tests/FunctionalTests/SendTo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public async Task Datagram_UDP_ShouldImplicitlyBindLocalEndpoint()
9595

9696
[Fact]
9797
[SkipOnPlatform(TestPlatforms.FreeBSD, "FreeBSD allows sendto() to broadcast")]
98-
[ActiveIssue("https://github.com/dotnet/runtime/issues/114450", typeof(PlatformDetection), nameof(PlatformDetection.IsMacCatalyst), nameof(PlatformDetection.IsX64Process))]
98+
[ActiveIssue("https://github.com/dotnet/runtime/issues/114450", TestPlatforms.OSX | TestPlatforms.MacCatalyst)]
9999
public async Task Datagram_UDP_AccessDenied_Throws_DoesNotBind()
100100
{
101101
IPEndPoint invalidEndpoint = new IPEndPoint(IPAddress.Broadcast, 1234);

0 commit comments

Comments
 (0)