Skip to content

XCL_NETWORK=0: the title still binds UDP 3074 on every interface (Windows Firewall asks, the network can reach it) #568

In review

Description

@tiagonleal

With XCL_NETWORK=0 the retail title (1.0.2.1) binds a UDP socket on 0.0.0.0:3074 at start. netoff refuses connect / sendto / name lookups, but not bind, so:

  • Windows Firewall shows "Do you want to allow public and private networks to access this app?" for xcl.exe, once per folder it runs from (every build tested from its own folder asks again; "Allow" needs an administrator).
  • If it is allowed, packets from the network reach the title's socket while it runs "without a network".

Seen: main 2997c9a and PR builds on it, release, Windows 11 Pro build 26300, RTX 5070 Ti, Ryzen 7 9800X3D. During a run (smoke.ps1 sets XCL_NETWORK=0):

PS> Get-NetUDPEndpoint -OwningProcess <pid of the xcl.exe running the title>
LocalAddress LocalPort
------------ ---------
0.0.0.0           3074

Proposed fix (small): with XCL_NETWORK=0, a bind to a non-loopback address (0.0.0.0, ::, or one of the machine's addresses) binds to loopback on the same port instead. The bind still succeeds, as on a console without a network, and the title's loopback traffic still works (socket pairs), but nothing from the network reaches it and Windows does not ask. Hooked like connect: in the title's ws2_32 imports (ordinal 2) and in the system's ws2_32!bind. I have it with a unit test and can open a PR.

AI use: Claude Code (Claude Opus 5.5) found this during test runs on my machine and wrote this issue.

Activity

  1. tiagonleal commented on Nov 24, 2026

    @tiagonleal
    ContributorAuthor

    Merge order for the nine open XCL_NETWORK=0 PRs, so they can go in as one batch with as few rebases as possible. Checked on main 930e8b4 with the heads #570 eaf034e43c, #612 bbf3174694, #619 2970626721, #807 62201a7d63, #808 13be36d054, #821 f9ef76857b, #462 17172b593a, #494 bf21fd8eff, #299 4d95ee8379.

    Seven of them edit crates/xcl/src/hle/netoff.rs; pairwise (git merge-tree, XX = conflict):

    570 612 619 807 808 821 462
    570 – XX XX XX XX ok ok
    612 XX – ok XX XX ok XX
    619 XX ok – ok ok ok ok
    807 XX XX ok – XX ok XX
    808 XX XX ok XX – ok ok
    821 ok ok ok ok ok – ok
    462 ok XX ok XX ok ok –

    Suggested order

    1. XCL_NETWORK=0: WSAConnectByList refuses all but loopback #821, XCL_NETWORK=0: IPv4-mapped loopback (::ffff:127.x.x.x) goes through #619, XCL_NETWORK=0: parse loopback IPs in local_name instead of matching any 127. prefix #808, Netoff: block ConnectEx when network is disabled #462, then XGameRuntime: with XCL_NETWORK=0 the connectivity hint says no network #494 and xcl run: warn when title network access is enabled #299 (other files): these six merge one after another with no conflict, and the hooks array stays right (19 entries, ; 19]: only Netoff: block ConnectEx when network is disabled #462 adds an entry).
    2. Then XCL_NETWORK=0: the system's WSASendMsg refuses too #612, XCL_NETWORK=0: WSASendTo lets loopback and connected sockets through, matching sendto #807, XCL_NETWORK=0: a bind to a network address binds to loopback #570, each needing a rebase on the one before. Every conflict is two additions at the same place (a #[link_name] import, an O_* static, an orig_* function, a test, the hooks array's length); none changes another PR's logic. Two of them merge "cleanly" in git but leave the wrong length (both PRs change 18 to 19), so the array has to be recounted at each step: 20 after XCL_NETWORK=0: the system's WSASendMsg refuses too #612, 20 after XCL_NETWORK=0: WSASendTo lets loopback and connected sockets through, matching sendto #807 (it fills WSASendTo's spare slot), 21 after XCL_NETWORK=0: a bind to a network address binds to loopback #570.

    All nine merged in that order, with those resolutions, are on the branch netoff-nine-merged of my fork (e605d19), in case it saves the resolving.

    Tested on that tree: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1742), Ryzen 7 9800X3D, Windows 11 Pro 26300, rustc 1.100.0 MSVC, debug.

    Not tested: a retail run of the merged tree; AMD / Intel. I did not review the nine PRs' logic beyond the conflicts.

    AI-assisted (Claude Code).

  2. added a commit that references this issue on Nov 24, 2026
    a12bbdd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions