Repository navigation
Conversation
WSASendMsg carries the destination in its message, so a datagram sent with it needs neither sendto nor connect, which are hooked. With XCL_NETWORK=0 on main a datagram sent with it to an address the hooked sendto refuses still arrived. It is hooked like sendto now: no address or loopback goes to the original, anything else is refused (WSAENETUNREACH). Not covered: the WSASendMsg that WSAIoctl hands out for WSAID_WSASENDMSG is another function (the provider's), not this export. Test: the export found through GetProcAddress refuses 8.8.8.8 with no socket; it fails on main, where the system answers 'not a socket'. Co-Authored-By: Claude <noreply@anthropic.com>
|
Test run of Tested
Review: On x64 Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
|
@MesshM, thanks for the RDNA4 run. On the question: yes, that is a second path, and this PR does not cover it. I checked it on main 508a0c7 and on this branch with a loopback-only scratch test:
Netoff has no hook on 🤖 Claude Fable 5.2 |
|
Windows / NVIDIA test of #612 ( Tested
Not tested: a retail run of this combined tree; AMD / Intel. Run and written with Claude Code (Claude Opus 5.5). |
Empirical test report (bbf3174)Hardware / environment
Commands and results
Observed behavior
Not tested The full GPU workspace suite and game smoke runs were omitted. AI use Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr612-focused.log and published. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
With
XCL_NETWORK=0the system'ssendtoandWSASendToare hooked (db1ddb2, #305), butWSASendMsgis not, and it carries its destination in the message. On main 508a0c7 a datagram sent with it to an address the hookedsendtorefuses still arrives. This hooks it withsendto's rule: no address or loopback goes to the original, anything else is refused withWSAENETUNREACH.Follow-up to #305 (closed), found with the scratch test from #444.
What is in it
crates/xcl/src/hle/netoff.rs:ws2_32!WSASendMsgin the table ofinstall_system_hooks, its detourwsa_send_msgand the call to the original.hle::netoff::tests::the_systems_wsasendmsg_refuses: the export, found throughGetProcAddress, is called with no socket. For 8.8.8.8 the hook answers 10051 before it looks at the socket. For 127.0.0.1 the call reaches the system, which answers something else. No socket is opened and nothing is sent.Tested
cargo test --workspace -- --test-threads=4onbbf3174(this PR, on main508a0c7): 681 passed, 0 failed, 41 ignored (thexcllibrary: 641 passed, 21 ignored). SKIPPED GPU tests: 2, bothno wave64(gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware).508a0c7with only the test added: fails (left: 10093, right: 10051, the system's own answer);::ffff:127.0.0.1, which the hooks treat as any other host.508a0c7with the hooks:sendtoandWSASendToare refused (10051);WSASendMsgreturns 0 and the datagram arrives.WSASendMsgto 127.0.0.1 itself still arrives.bbf3174merged onto maindd2ae9a: 691 passed, 0 failed, 41 ignored (thexcllibrary: 651 passed, 21 ignored), no SKIPPED tests.Regression run
Our own runs, one after the other on the machine under Tested (RTX 5070 Ti), release builds, no uncommitted changes.
main:
PR:
Not tested
WSASendMsgthatWSAIoctl(SIO_GET_EXTENSION_FUNCTION_POINTER, WSAID_WSASENDMSG)hands out. It is another function than the export (the scratch test prints two addresses), and a datagram sent through it still arrives with this change. Refusing it needs a hook onWSAIoctl, which Netoff: block ConnectEx when network is disabled #462 (open) adds forConnectEx; it is not in this PR.WSASendMsgthrough the hook: the calls above are synchronous.AI use
🤖 Generated with Claude Code