Repository navigation
Net: forward zero-address datagram disconnects - #2066
fuzeofficlal wants to merge 1 commit into
Conversation
|
Triage verdict — Keep the disconnect fix, account for the Wine result ( Evidence
Checks and limits
Next step
This verification was AI-assisted. |
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.
Zero-address datagram disconnects forwarded — net-stack edge case; good defensive forwarding.
a6d773e to
379e1ba
Compare
|
Updated in On Wine, |
|
Automated triage for the maintainers. Needs work. This needs the maintainer's decision, because it still adds a path past On your reply: confirmed in The remaining question is policy: whether the maintainer accepts a second exception beside the loopback rule in the Generated by Claude Code |
Allow all-zero sockaddrs, AF_INET 0.0.0.0:0, and AF_INET6 [::]:0 in connect and WSAConnect to reach host Winsock unchanged so connected UDP sockets can disconnect and stream sockets receive the host's native error without weakening the loopback-only offline policy.
379e1ba to
1f723fb
Compare
|
Updated in
|
|
Independent CPU-only verification on Windows (Rust 1.100.0/MSVC, worktree-local
Note: only the named synthetic test was replayed; the full crate suite was not run, and Windows socket behaviour beyond the synthetic forms was not exercised. GPU/driver: N/A (CPU-only HLE test). AI-assisted (Hy4 flash). No game data, assets, extracted shaders or DRM involved. |
Fixes #891.
Summary
sockaddrforms (all-zeroAF_UNSPEC,0.0.0.0:0, and[::]:0) pastreachableinnet::connectandnet::WSAConnect(crates/victory-hle/src/modules/net.rs), forwarding the caller's(name, len)buffer unchanged to the host'sws2_32.dll.SOCK_DGRAM) sockets disconnect cleanly without leaving the machine, while stream (SOCK_STREAM) sockets receive the native Winsock error (WSAEADDRNOTAVAILfor0.0.0.0:0,WSAEAFNOSUPPORTfor all-zeroAF_UNSPEC), and non-zero ports (0.0.0.0:80) or external peers remain blocked withWSAENETUNREACH.Verification
modules::net::tests::zero_address_accepts_only_disconnect_formsmodules::net::tests::zero_address_disconnects_datagram_sockets_while_blocking_external_peers(covers UDP disconnect viaconnect/WSAConnect, TCPSOCK_STREAMWSAEADDRNOTAVAIL/WSAEAFNOSUPPORT, and blocked external/non-zero-port peers)cargo test -p victory-hle --locked,cargo clippy -p victory-hle --tests --locked -- -D warnings, andcargo xtask policy: passed.