XCL_NETWORK=0: WSASendTo lets loopback and connected sockets through, matching sendto #801
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/807"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by mastrr9 on 2026-11-24T05:41:35Z.
With
XCL_NETWORK=0,sendtolets datagrams to loopback and null destination addresses (connected sockets) through, whereaswsa_send_tounconditionally refused every call withWSAENETUNREACH(10051) and installed its system hook withspare()instead of a dedicated trampoline.What is in it
crates/xcl/src/hle/netoff.rs: addsreal_wsa_send_to,O_WSA_SEND_TO, andorig_wsa_send_to, wiresWSASendToininstall_system_hooks()to&O_WSA_SEND_TO, and updateswsa_send_toto allowto.is_null() || loopback(to, tolen)(matchingsendto).wsa_send_to_lets_loopback_through(verifies8.8.8.8still returnsWSAENETUNREACH, while127.0.0.1and null destination reach Winsock's own error).netoff.rs, though none touchwsa_send_to.Tested
617.42/32.0.16.1742), Windows 11 Pro 25H2 (26200.9974), D3D12 debug layer installed (d3d12SDKLayers.dll),rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC from Windows SDK10.0.26100.0, debug build.maind208e14):hle::netoff::tests::wsa_send_to_lets_loopback_throughfailed withWSAENETUNREACH(10051) on127.0.0.1.5653bd7/ pushed head5cac6e9):cargo build --workspace && cargo test --workspace -- --test-threads=4gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64).Regression run
Smoke run by @Toons29 in comment below: https://github.com/xcl-dev/xcl/pull/807#issuecomment-7151502296
Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted.
main:
PR:
Tester's setup and limits: AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.Tester's AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; the tester checked the blocks before posting.Not tested
AI use
netoff.rs, verified the negative control and full Windows RTX 5080 MSVC workspace suite, and drafted this PR description.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T07:06:13Z.
Full-suite run, since this PR has no test report yet. Tested exact head
5cac6e9(on its based208e14).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 705 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.wsa_send_to_lets_loopback_through.Not tested
AI use
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T07:17:43Z.
Linux / AMD RDNA3 datapoint.
Merged state: head
5cac6e9onto mainbeaa245, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 707 passed, 7 failed, 41 ignored. Failures are the known Wine-lane set from my #42 rows plus #718 trio members; nothing here fails because of your change.wsa_send_to_lets_loopback_throughandonly_loopback_goes_throughok under Proton Experimental withXCL_NETWORK=0.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
upstream-sync referenced this pull request2026-11-24 13:02:56 +00:00
Imported from ivall/xcl. Originally posted by OrangeCrane1738 on 2026-11-24T17:06:49Z.
Test report for
62201a7on the retail title: one 120 s smoke run without this PR and one with it.Tested
scripts/smoke.ps1 -Seconds 120on the retail title, no input.maindies early on the XAsync routing that #235 fixes. Both builds therefore include #235:main930e8b4+ #235, and the same + this PR (62201a7). Their commits are local merges, so the blocks below can't stand in for the main / PR-head pair the PR check needs.title:line is the game folder's name, shortened.XCL_NETWORK=0: ... failslines), and the system hooks installed in both.Smoke runs
main
930e8b4+ #235main
930e8b4+ #235 + #807 (62201a7)Review note: merge order
Letting a null destination through relies on a connected socket only ever having been connected to loopback. On
main,connectandWSAConnectare refused, butConnectEx(#444 / #462) andWSAConnectByList(#821) are not yet, so until those are in, a socket connected through either could send out throughWSASendTowith a null destination. The same already holds forsendto(and forsend/WSASend, which aren't hooked), so this PR doesn't open anything new; merging #462 and #821 first closes it for all of them.Not tested
mainand of this PR's head as they are (no Gaming Services here, see above).WSASendTo.AI use
Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:00:48Z.
Regression run of
62201a7don the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 100 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T10:48:24Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:41:21Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:10:36Z.
Triage (#1607) – head
62201a7No open or merged PR makes the same change: on main, netoff.rs
wsa_send_tostill refuses every call, whilesendtoandWSASendMsg(#612) already let null and loopback destinations through. This PR adds the matching original trampoline (O_WSA_SEND_TO) and test. No problems found in the diff.The branch conflicts with main (the
WSASendMsghook andO_WSA_SEND_MSGwere added next to the same lines) and needs a rebase.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.