Repository navigation
Conversation
A socket for both IPv6 and IPv4 names an IPv4 host by its mapped address, so a connection to 127.0.0.1 from one arrives at the hooks as ::ffff:127.0.0.1. Only ::1 counted as IPv6 loopback, and connect and sendto refused it (WSAENETUNREACH) although nothing leaves the machine. Titles make socket pairs on loopback, which is why loopback is let through at all. Test: only_loopback_goes_through takes the mapped form of 127.0.0.1 as loopback and that of 8.8.8.8 as not; the first fails on main. Co-Authored-By: Claude <noreply@anthropic.com>
|
Test run of Tested
Review: The mapped form is checked on the right bytes of 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. |
|
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 (2970626)Hardware / environment
Commands and results
Observed behavior
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. |
With
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 main 508a0c7 the 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.ConnectExdetour uses the sameloopback.AI use
🤖 Generated with Claude Code