saulecabrera opened issue #12568:
Consider
async fn test_unspecified_remote_addr(family: IpAddressFamily) { let sock = UdpSocket::create(family).unwrap(); let unspec = IpSocketAddress::unspecified(family, PORT); let result = sock.send(vec![0; 1], Some(unspec)).await; assert!(matches!(result, Err(ErrorCode::InvalidArgument))); }The test above fails.
According to the spec:
_
invalid-argument: The IP address inremote-addressis set to INADDR_ANY (0.0.0.0/::)._The current implementation returns
remote-unreachableinstead. The behavior is consistent on macOS, Windows and Linux.
saulecabrera added the bug label to Issue #12568.
saulecabrera added the wasi label to Issue #12568.
alexcrichton commented on issue #12568:
cc @badeend
alexcrichton commented on issue #12568:
@badeend if you don't mind me pinging you again on this, I was wondering if you had thoughts on this issue/test? On Linux at least this is returning
Ok(())instead of an error. On macOS I getErrorCode::RemoteUnreachableas Saul mentions.
badeend commented on issue #12568:
Hmm, never got a notification for that first ping. Anyhow..
Yes, good catch @saulecabrera. I think this got lost somewhere during the p2->p3 conversion. The P2 implementation _does_ have this check:
I've opened a PR to do the same thing in P3: https://github.com/bytecodealliance/wasmtime/pull/13631
alexcrichton closed issue #12568:
Consider
async fn test_unspecified_remote_addr(family: IpAddressFamily) { let sock = UdpSocket::create(family).unwrap(); let unspec = IpSocketAddress::unspecified(family, PORT); let result = sock.send(vec![0; 1], Some(unspec)).await; assert!(matches!(result, Err(ErrorCode::InvalidArgument))); }The test above fails.
According to the spec:
_
invalid-argument: The IP address inremote-addressis set to INADDR_ANY (0.0.0.0/::)._The current implementation returns
remote-unreachableinstead. The behavior is consistent on macOS, Windows and Linux.
Last updated: Jul 29 2026 at 05:03 UTC