XCL_NETWORK=0: IPv4-mapped loopback (::ffff:127.x.x.x) goes through #614

Merged
Kalmarv merged 1 commit from upstream-pr/619 into main 2026-11-29 13:58:04 +00:00
Kalmarv commented 2026-11-24 02:34:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-24T02:34:15Z.


With XCL_NETWORK=0 loopback is let through, because titles make socket pairs. loopback knew 127.0.0.0/8 and ::1, but not the IPv4-mapped form: a socket for both IPv6 and IPv4 (IPV6_V6ONLY off) names 127.0.0.1 as ::ffff:127.0.0.1. On main 508a0c7 the hooked connect and sendto refuse that address with WSAENETUNREACH, 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: a sockaddr_in6 whose address is ::ffff:127.x.x.x is 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

  • RTX 5070 Ti, NVIDIA 610.74, Ryzen 9 9950X, Windows 11 Pro 26200; Rust 1.99.0, MSVC stable, debug.
  • cargo test --workspace -- --test-threads=4 on 2970626 (this PR, on main 508a0c7): 680 passed, 0 failed, 41 ignored (the xcl library: 640 passed, 21 ignored). SKIPPED GPU tests: 2, both no wave64 (gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware).
  • The changed test:
    • main 508a0c7 with only the two new asserts: fails at the first (the mapped 127.0.0.1);
    • this change: passes.
  • A scratch test, not in the PR, loopback only: a TCP listener and a UDP socket on 127.0.0.1, reached from a socket for both IPv6 and IPv4 as ::ffff:127.0.0.1.
    • main 508a0c7 with the hooks: connect and sendto are refused (10051);
    • this change with the hooks: the connection and the datagram arrive.
  • @MesshM's run on AMD (comment): Radeon RX 9060 XT 16 GB, driver 32.0.32029.2010, Ryzen 7 5700X, Windows 11 Pro 26200, Rust 1.100.0, debug. 2970626 merged onto main dd2ae9a: 690 passed, 0 failed, 41 ignored (the xcl library: 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:

xcl-smoke v1
commit: 508a0c74d7c0625d6d2de8d24494e69dc2e1926f
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1513 (PresentX 1513)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14266 MB

PR:

xcl-smoke v1
commit: 29706267219676b8beab0d05dc8cab5364789014
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 60
exit: 0x0
frames shown: 1510 (PresentX 1510)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14269 MB

Not tested

  • Whether any title makes its socket pairs this way.
  • The address as a name: getaddrinfo("::ffff:127.0.0.1") is still refused (local_name is unchanged).
  • WSASendTo, which refuses every destination, loopback too, before and after this change.
  • Intel GPUs. Wine.
  • macOS / Linux: not built.
  • It merges without conflicts with #462 (17172b5), whose ConnectEx detour uses the same loopback.

AI use

  • Claude Code, Claude Fable 5.2: wrote the change, the test and this description; the runs above are its own.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5465001935 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/619). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-24T02:34:15Z. --- With `XCL_NETWORK=0` loopback is let through, because titles make socket pairs. `loopback` knew 127.0.0.0/8 and `::1`, but not the IPv4-mapped form: a socket for both IPv6 and IPv4 (`IPV6_V6ONLY` off) names 127.0.0.1 as `::ffff:127.0.0.1`. On main 508a0c7 the hooked `connect` and `sendto` refuse that address with `WSAENETUNREACH`, 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`: a `sockaddr_in6` whose address is `::ffff:127.x.x.x` is 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** - RTX 5070 Ti, NVIDIA 610.74, Ryzen 9 9950X, Windows 11 Pro 26200; Rust 1.99.0, MSVC stable, debug. - `cargo test --workspace -- --test-threads=4` on `2970626` (this PR, on main `508a0c7`): 680 passed, 0 failed, 41 ignored (the `xcl` library: 640 passed, 21 ignored). SKIPPED GPU tests: 2, both `no wave64` (`gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`). - The changed test: - main `508a0c7` with only the two new asserts: fails at the first (the mapped 127.0.0.1); - this change: passes. - A scratch test, not in the PR, loopback only: a TCP listener and a UDP socket on 127.0.0.1, reached from a socket for both IPv6 and IPv4 as `::ffff:127.0.0.1`. - main `508a0c7` with the hooks: `connect` and `sendto` are refused (10051); - this change with the hooks: the connection and the datagram arrive. - @MesshM's run on AMD ([comment](https://github.com/ivall/xcl/pull/619#issuecomment-7120865256)): Radeon RX 9060 XT 16 GB, driver 32.0.32029.2010, Ryzen 7 5700X, Windows 11 Pro 26200, Rust 1.100.0, debug. `2970626` merged onto main `dd2ae9a`: 690 passed, 0 failed, 41 ignored (the `xcl` library: 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: ``` xcl-smoke v1 commit: 508a0c74d7c0625d6d2de8d24494e69dc2e1926f gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1513 (PresentX 1513) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14266 MB ``` PR: ``` xcl-smoke v1 commit: 29706267219676b8beab0d05dc8cab5364789014 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 60 exit: 0x0 frames shown: 1510 (PresentX 1510) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14269 MB ``` **Not tested** - Whether any title makes its socket pairs this way. - The address as a name: `getaddrinfo("::ffff:127.0.0.1")` is still refused (`local_name` is unchanged). - `WSASendTo`, which refuses every destination, loopback too, before and after this change. - Intel GPUs. Wine. - macOS / Linux: not built. - It merges without conflicts with #462 (17172b5), whose `ConnectEx` detour uses the same `loopback`. **AI use** - Claude Code, Claude Fable 5.2: wrote the change, the test and this description; the runs above are its own. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MesshM commented 2026-11-24 07:05:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T03:11:59Z.


Test run of 29706267219676b8beab0d05dc8cab5364789014 on AMD RDNA4. I merged it onto current main dd2ae9a locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 690 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 650 passed, 0 failed, 21 ignored
  • 0 SKIPPED; 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 an AF_INET6 sockaddr 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 onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

<!-- greyfinch-sync:ivall/xcl:comment:7120865256 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/619#issuecomment-7120865256). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T03:11:59Z. --- Test run of `29706267219676b8beab0d05dc8cab5364789014` on AMD RDNA4. I merged it onto current `main` `dd2ae9a` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **690 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 650 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `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 an `AF_INET6` sockaddr 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 onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
tiagonleal commented 2026-11-24 13:03:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-24T12:49:25Z.


Windows / NVIDIA test of #612 (bbf3174694) and #619 (2970626721) merged together onto main 47efa2e (both clean), with #570 rebased on top.

Tested

  • NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1742), Ryzen 7 9800X3D, Windows 11 Pro 26300, rustc 1.100.0 MSVC, debug.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 on 47efa2e + #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).
  • #570 on top conflicts as upipibi described on #570 (note_bind next to the rewritten loopback doc, 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).

<!-- greyfinch-sync:ivall/xcl:comment:7131966651 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/619#issuecomment-7131966651). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-24T12:49:25Z. --- Windows / NVIDIA test of #612 (`bbf3174694`) and #619 (`2970626721`) merged together onto `main` `47efa2e` (both clean), with #570 rebased on top. **Tested** - NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1742), Ryzen 7 9800X3D, Windows 11 Pro 26300, rustc 1.100.0 MSVC, debug. - `cargo build --workspace && cargo test --workspace -- --test-threads=4` on `47efa2e` + #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`). - #570 on top conflicts as upipibi described on #570 (`note_bind` next to the rewritten `loopback` doc, `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 commented 2026-11-25 07:05:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T06:37:04Z.


Empirical test report (29706267)

Hardware / environment

  • PR #619 tested at detached commit 29706267219676b8beab0d05dc8cab5364789014 on Windows x64, OS build 10.0.26200.9974.
  • CPU identifier reported by Windows was AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD.
  • Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), Cargo 1.100.0, and DXC 1.9.2609.5 (01b62ad47). The test profile was unoptimized, with debug info and incremental compilation disabled.
  • The focused run used XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1. Both commands ran directly, outside Invoke-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 ^SKIPPED lines in the combined output.
  • Both commands emitted a deprecation warning for AtomicU32::fetch_update in XGameRuntime. The PR extends one unit test and changes no integration tests.

Observed behavior

  • only_loopback_goes_through accepted ::ffff:127.0.0.1 and rejected ::ffff:8.8.8.8 as socket address inputs. Its existing IPv4 and IPv6 loopback checks also passed.
  • the_systems_own_network_functions_refuse confirmed that the system hooks reject the WinHTTP and WinINet calls and the external name lookup in the test. The localhost lookup reached Winsock.

Not tested

  • Full GPU workspace suite, game smoke runs, and live traffic over a dual-stack socket.

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.

<!-- greyfinch-sync:ivall/xcl:comment:7154978481 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/619#issuecomment-7154978481). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T06:37:04Z. --- ### Empirical test report (29706267) **Hardware / environment** - PR #619 tested at detached commit `29706267219676b8beab0d05dc8cab5364789014` on Windows x64, OS build `10.0.26200.9974`. - CPU identifier reported by Windows was `AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD`. - Rust `1.100.0` (`0ef1bc386`, `x86_64-pc-windows-msvc`), Cargo `1.100.0`, and DXC `1.9.2609.5` (`01b62ad47`). The test profile was unoptimized, with debug info and incremental compilation disabled. - The focused run used `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. Both commands ran directly, outside `Invoke-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 `^SKIPPED ` lines in the combined output. - Both commands emitted a deprecation warning for `AtomicU32::fetch_update` in XGameRuntime. The PR extends one unit test and changes no integration tests. **Observed behavior** - `only_loopback_goes_through` accepted `::ffff:127.0.0.1` and rejected `::ffff:8.8.8.8` as socket address inputs. Its existing IPv4 and IPv6 loopback checks also passed. - `the_systems_own_network_functions_refuse` confirmed that the system hooks reject the WinHTTP and WinINet calls and the external name lookup in the test. The `localhost` lookup reached Winsock. **Not tested** - Full GPU workspace suite, game smoke runs, and live traffic over a dual-stack socket. **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 commented 2026-11-25 13:05:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:43:44Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7162773365 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/619#issuecomment-7162773365). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T12:43:44Z. --- 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!
throny commented 2026-11-28 06:50:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T06:50:20Z.


merge-check claim
head: 2970626721

<!-- greyfinch-sync:ivall/xcl:comment:7235549283 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/619#issuecomment-7235549283). Originally posted by [throny](https://github.com/throny) on 2026-11-28T06:50:20Z. --- merge-check claim head: 29706267219676b8beab0d05dc8cab5364789014
throny commented 2026-11-28 07:07:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T07:07:01Z.


merge-check
base: e429936c
head: 2970626721
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2126 passed, 9 failed, 48 ignored (the PR extends an existing test) (26 SKIPPED lines). The 9 failures are main's own at e429936c on this GPU (reported with a bisect on #3041: they arrive with the merge of #2959); the set is identical with and without this PR. Base alone: 2126 passed, 9 failed, 48 ignored.
review: none. The new case accepts exactly ::ffff:127.0.0.0/104: ten zero bytes, ff ff, then 127. It does not accept the IPv4-compatible form (::127.0.0.1), the SIIT form, NAT64 (64:ff9b::/96) or 6to4 addresses; the length check covers the 16 address bytes; the scope id is ignored, which does not matter for loopback. So XCL_NETWORK=0 gains one more loopback spelling and nothing else. For whoever merges: a rebase conflict between #570 and this PR is reported in the thread (merge order).
performance: a few byte compares per hooked connect or sendto.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7235726303 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/619#issuecomment-7235726303). Originally posted by [throny](https://github.com/throny) on 2026-11-28T07:07:01Z. --- merge-check base: e429936c head: 29706267219676b8beab0d05dc8cab5364789014 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2126 passed, 9 failed, 48 ignored (the PR extends an existing test) (26 SKIPPED lines). The 9 failures are main's own at e429936c on this GPU (reported with a bisect on #3041: they arrive with the merge of #2959); the set is identical with and without this PR. Base alone: 2126 passed, 9 failed, 48 ignored. review: none. The new case accepts exactly ::ffff:127.0.0.0/104: ten zero bytes, ff ff, then 127. It does not accept the IPv4-compatible form (::127.0.0.1), the SIIT form, NAT64 (64:ff9b::/96) or 6to4 addresses; the length check covers the 16 address bytes; the scope id is ignored, which does not matter for loopback. So XCL_NETWORK=0 gains one more loopback spelling and nothing else. For whoever merges: a rebase conflict between #570 and this PR is reported in the thread (merge order). performance: a few byte compares per hooked connect or sendto. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
tiagonleal commented 2026-11-29 11:15:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-29T11:15:11Z.


merge-check
base: d8bd9a3820
head: 2970626721
merge: clean (trial merge 2b96eedc, local, not pushed; git diff --check clean). main moved to d2ec83de while this ran: netoff.rs did not change in between and the trial merge onto d2ec83de is clean too; build and tests below are on the d8bd9a38 merge.
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> 2614 passed, 4 failed, 49 ignored; SKIPPED: 26 (21 "no wave64" on this GPU, 3 per-lane f16 forms refused, 2 "no heap windows"); failing: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0 to _3, which fail on the base too (base alone: 2613 passed, 5 failed, 49 ignored; its fifth was the intermittent e2e check of #3382). hle::netoff::tests::only_loopback_goes_through, which carries the two new asserts, passed.
review: whole diff read (+11/-2, netoff.rs). The new arm of loopback() accepts exactly ::ffff:127.0.0.0/104: bytes 0 to 9 zero, 10 and 11 ff, 12 equal to 127. The existing len >= 24 guard covers every byte it reads. Nothing else becomes loopback; a mapped 8.8.8.8 is still refused, and the test checks both. The first new assert fails without the change by construction, since the old expression needs byte 10 to be 0. loopback() is shared, so the change also reaches sendto and WSAConnect, as intended. One thing for whoever merges: my #570 adds a function right above loopback() and the two PRs touch the same doc line, so the second one to land needs a small rebase. With both in, a bind to ::ffff:127.x.x.x is left as it is, which is right. Not covered: real dual-stack traffic from a title.
performance: a few byte compares per hooked call, and only with XCL_NETWORK=0. A 60 s smoke of the merged tree shows 1699 frames against 1691 and 1695 for two runs of the base.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 5070 Ti 16 GB (617.42), AMD Ryzen 7 9800X3D, Windows 11 Pro 26300, rustc 1.100.0, debug / Claude Code: Claude Fable 5.2 ran the merge, build and suite; Claude Opus 5.5 read the diff.

  • Tiago
<!-- greyfinch-sync:ivall/xcl:comment:7254984311 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/619#issuecomment-7254984311). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-29T11:15:11Z. --- merge-check base: d8bd9a38204667f3ca7dd9eeffcc2f1c937b07b0 head: 29706267219676b8beab0d05dc8cab5364789014 merge: clean (trial merge 2b96eedc, local, not pushed; `git diff --check` clean). `main` moved to `d2ec83de` while this ran: `netoff.rs` did not change in between and the trial merge onto `d2ec83de` is clean too; build and tests below are on the `d8bd9a38` merge. build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> 2614 passed, 4 failed, 49 ignored; SKIPPED: 26 (21 "no wave64" on this GPU, 3 per-lane f16 forms refused, 2 "no heap windows"); failing: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0` to `_3`, which fail on the base too (base alone: 2613 passed, 5 failed, 49 ignored; its fifth was the intermittent e2e check of #3382). `hle::netoff::tests::only_loopback_goes_through`, which carries the two new asserts, passed. review: whole diff read (+11/-2, `netoff.rs`). The new arm of `loopback()` accepts exactly `::ffff:127.0.0.0/104`: bytes 0 to 9 zero, 10 and 11 `ff`, 12 equal to 127. The existing `len >= 24` guard covers every byte it reads. Nothing else becomes loopback; a mapped `8.8.8.8` is still refused, and the test checks both. The first new assert fails without the change by construction, since the old expression needs byte 10 to be 0. `loopback()` is shared, so the change also reaches `sendto` and `WSAConnect`, as intended. One thing for whoever merges: my #570 adds a function right above `loopback()` and the two PRs touch the same doc line, so the second one to land needs a small rebase. With both in, a bind to `::ffff:127.x.x.x` is left as it is, which is right. Not covered: real dual-stack traffic from a title. performance: a few byte compares per hooked call, and only with `XCL_NETWORK=0`. A 60 s smoke of the merged tree shows 1699 frames against 1691 and 1695 for two runs of the base. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 5070 Ti 16 GB (617.42), AMD Ryzen 7 9800X3D, Windows 11 Pro 26300, rustc 1.100.0, debug / Claude Code: Claude Fable 5.2 ran the merge, build and suite; Claude Opus 5.5 read the diff. - Tiago
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!614
No description provided.