XCL_NETWORK=0: IPv4-mapped loopback (::ffff:127.x.x.x) goes through #619
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!619
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-619"
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?
@Kalmarv on GitHub · 2026-11-24 02:34 UTC · original
Kalmarv:fix/netoff-mapped-loopback→main· +11 −2 · 1 files · 1 commits · openWith
XCL_NETWORK=0loopback is let through, because titles make socket pairs.loopbackknew 127.0.0.0/8 and::1, but not the IPv4-mapped form: a socket for both IPv6 and IPv4 (IPV6_V6ONLYoff) names 127.0.0.1 as::ffff:127.0.0.1. On main508a0c7the hookedconnectandsendtorefuse that address withWSAENETUNREACH, although its listener is on this machine. The mapped form of 127.0.0.0/8 now counts as loopback.Follow-up to #305 (closed).
What is in it
crates/xcl/src/hle/netoff.rs,loopback: asockaddr_in6whose address is::ffff:127.x.x.xis loopback.hle::netoff::tests::only_loopback_goes_through: the mapped form of 127.0.0.1 is loopback, that of 8.8.8.8 is not.Tested
cargo test --workspace -- --test-threads=4on2970626(this PR, on main508a0c7): 680 passed, 0 failed, 41 ignored (thexcllibrary: 640 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 two new asserts: fails at the first (the mapped 127.0.0.1);::ffff:127.0.0.1.508a0c7with the hooks:connectandsendtoare refused (10051);2970626merged onto maindd2ae9a: 690 passed, 0 failed, 41 ignored (thexcllibrary: 650 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
getaddrinfo("::ffff:127.0.0.1")is still refused (local_nameis unchanged).WSASendTo, which refuses every destination, loopback too, before and after this change.17172b5), whoseConnectExdetour uses the sameloopback.AI use
🤖 Generated with Claude Code
github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@MesshM on GitHub · 2026-11-24 03:11 UTC · original
Test run of
29706267219676b8beab0d05dc8cab5364789014on AMD RDNA4. I merged it onto currentmaindd2ae9alocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 690 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 650 passed, 0 failed, 21 ignoredSKIPPED;only_loopback_goes_through(with the new mapped cases) passes.Review: The mapped form is checked on the right bytes of
sin6_addr(ten zero bytes,ff ff, then 127), and the test builds anAF_INET6sockaddr with the address at offset 8, so it exercises the same layout the hook reads. A mapped non-loopback address (8.8.8.8) is still refused. I found nothing to change.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@tiagonleal on GitHub · 2026-11-24 12:49 UTC · original
Windows / NVIDIA test of #612 (
bbf3174694) and #619 (2970626721) merged together ontomain47efa2e(both clean), with #570 rebased on top.Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4on47efa2e+ #612 + #619 + #570: 743 passed, 0 failed, 41 ignored. SKIPPED:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64).cargo test -p xcl --lib netoff: 4 passed (only_loopback_goes_through,the_systems_own_network_functions_refuse,the_systems_wsasendmsg_refuses,a_bind_to_every_interface_stays_on_loopback).note_bindnext to the rewrittenloopbackdoc,O_BIND/O_WSA_SEND_MSG, the hooks array); resolved with both entries and the array at 20. I'll push that rebase to #570 once these two are in.Not tested: a retail run of this combined tree; AMD / Intel.
Run and written with Claude Code (Claude Opus 5.5).
@JJAutoCompare on GitHub · 2026-11-25 06:37 UTC · original
Empirical test report (
29706267)Hardware / environment
29706267219676b8beab0d05dc8cab5364789014on Windows x64, OS build10.0.26200.9974.AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD.1.100.0(0ef1bc386,x86_64-pc-windows-msvc), Cargo1.100.0, and DXC1.9.2609.5(01b62ad47). The test profile was unoptimized, with debug info and incremental compilation disabled.XCL_ADAPTER=NONE_CPU_ONLYandRUST_TEST_NOCAPTURE=1. Both commands ran directly, outsideInvoke-ArcTest.ps1, with no Arc GPU mutex hold.Commands and results
cargo test --workspace --no-run— exit 0. Cargo built the workspace test executables. This step compiled only.cargo test -p xcl --lib hle::netoff::tests:: -- --test-threads=1— exit 0. 2 passed / 0 failed / 0 ignored / 0 skipped. Libtest filtered out 659 tests. The skipped count is the number of case-sensitive^SKIPPEDlines in the combined output.AtomicU32::fetch_updatein XGameRuntime. The PR extends one unit test and changes no integration tests.Observed behavior
only_loopback_goes_throughaccepted::ffff:127.0.0.1and rejected::ffff:8.8.8.8as socket address inputs. Its existing IPv4 and IPv6 loopback checks also passed.the_systems_own_network_functions_refuseconfirmed that the system hooks reject the WinHTTP and WinINet calls and the external name lookup in the test. Thelocalhostlookup reached Winsock.Not tested
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr619-focused.log and published.
@DavidM1911 on GitHub · 2026-11-25 12:43 UTC · original
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!
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.