HLE: WSAConnectByList and GetAddrInfoExA fail where the host lacks them, not abort (Wine) #2249
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2249
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2249"
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?
@desplmfao on GitHub · 2026-11-25 08:49 UTC · original
desplmfao:port/slak-net→main· +50 −3 · 1 files · 1 commits · openThis is commit
d469fe9from @Slaktarn700'sproton-fixesbranch, carried onto currentmain(940d32f). Their commit keeps them as author. That branch was never opened upstream; this is the one change from it thatmainstill needs.Problem
net.rscallsWSAConnectByListandGetAddrInfoExAthroughhost!, andhost!panics when the host DLL lacks the export (files.rs). Wine'sws2_32.dlldoesn't export these two, so a title calling either one under Wine/Proton ends with "the host lacks ws2_32.dll!…" instead of getting an error back.Change
Where the host lacks either function, the call now fails cleanly:
WSAConnectByListreturns failure withWSAEOPNOTSUPP.GetAddrInfoExAtakesmain'sblocked_lookup(result)path, so*resultis cleared the same way as for any other blocked lookup.On Windows hosts that have the exports, nothing changes.
Tested
cargo test -p victory-hle net::(Windows x64, under Proton here): 2 passed. The export check is insideonly_loopback_is_reachable.cargo clippy -p victory-hle --all-targets -- -D warnings: clean.AI-assisted (Claude Code).
🤖 Generated with Claude Code
@Marvisak on GitHub · 2026-11-25 12:42 UTC · original
Automated triage for the maintainers.
Merge candidate. In
crates/victory-hle/src/modules/net.rs,WSAConnectByListandGetAddrInfoExAnow look up their host function once. Where the host lacks it (Wine'sws2_32), they fail the call instead of the process aborting inhost!:WSAEOPNOTSUPPfor the connect, andblocked_lookup(name not found) for the lookup.This does not loosen the offline guards. Both overrides still run their existing checks first (the loopback-only connect check,
resolvable), and the new fallback only fails calls. The export test skips these two only when the host lacks them, so Windows still requires them. CIcheckpasses, and the branch merges cleanly.Generated by Claude Code
@ntgata1-dotcom on GitHub · 2026-11-25 13:19 UTC · original
Wine 11.22: the export test passes, and both fallbacks work as described
Arch Linux, system Wine 11.22, at
3cd19eb.cargo xwin test --locked --no-fail-fast --target x86_64-pc-windows-msvc -p victory-hle --lib, runnerwine. Wine 11.22'sws2_32.dllexportsWSAConnectByNameAandGetAddrInfoExW, but notWSAConnectByListorGetAddrInfoExA.victory-hleunder Winemain940d32fonly_loopback_is_reachablepasses. Onmainit fails atws2_32.dll lacks WSAConnectByList. The one left isxgamesave::tests::a_kept_blob_past_the_link_limit_is_copied, which also fails onmain(the temp folder isn't NTFS here).blocked_name_lookups_clear_the_resultuses a blocked name, which is refused before them, and nothing callsWSAConnectByList. So I called both from a temporary local test (not part of this PR), the way a title would:WSAConnectByListwith one loopback address returns 0, andWSAGetLastErrorgives 10045 (WSAEOPNOTSUPP). Onmainthe same call panics withthe host lacks ws2_32.dll!WSAConnectByList.GetAddrInfoExA("localhost")returns 11001 (WSAHOST_NOT_FOUND) and clears the result.Not run: Windows.
AI-assisted (Claude Code); numbers from my own runs.
@fuzeofficlal on GitHub · 2026-11-26 00:55 UTC · original
Code review and Windows 11 verification at head
3cd19eb63118merged cleanly ontomain(63bcca43c6a0):crates/victory-hle/src/modules/net.rs:323-346, 612-635, 1153):WSAConnectByListcacheshost::function("ws2_32.dll", "WSAConnectByList")inOnceLock<Option<usize>>, settingWSAEOPNOTSUPP(10045) and returning0when absent (e.g. Wine) while forwarding directly on Windows 11 with zero per-call lookup overhead.GetAddrInfoExAfollows the same cached lookup pattern, callingblocked_lookup(result)(writingnull_mut()when non-null and returningWSAHOST_NOT_FOUND = 11001) if absent, andhost_has_all_forwarded_exportscleanly excludes both symbols inMISSING_ON_WINE.cargo xtask policy:191 files ok;cargo clippy -p victory-hle --all-targets -- -D warnings: 0 warningscargo test --locked -p victory-hle --lib -- net::: 2/2 passed.LGTM.
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.