HLE: clear blocked DNS lookup results #1474
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1475"
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?
Imported from Marvisak/VIctory. Originally posted by ToxicmaggotRP on 2026-11-24T18:18:06Z.
Summary
When VIctory blocks a DNS lookup for a non-loopback host, the four Winsock wrappers returned
WSAHOST_NOT_FOUNDbut left the caller's*resultunchanged. A caller that reused a result variable could therefore retain a stale pointer after a failed lookup.Changes
getaddrinfo,GetAddrInfoW,GetAddrInfoExA, andGetAddrInfoExWcalls.This follows the API-compatibility practice illustrated by XCL's native API comparison for
RegisterClassExA; this patch is an independent VIctory implementation and contains no copied XCL code. Refs #1242 (VIC-BT-023).Validation
cargo test --locked -p victory-hle— 95 passed; integration test 1 passed.rustfmt --edition 2024 --check crates/victory-hle/src/modules/net.rs— passed.git diff --check— passed.cargo fmt --all -- --checkreports existing formatting differences in untouched files.Imported from Marvisak/VIctory. Originally posted by acetonahard-code on 2026-11-24T21:10:04Z.
Heads-up: #1411 (opened about half an hour earlier) adds the same helper. A blocked forward lookup clears
*resultand returnsWSAHOST_NOT_FOUND, in the same four wrappers. The two conflict innet.rs.Tested on Windows 11 with the repo toolchain, merged into current
main(ffe310e):cargo test -p victory-hlemainmain+ this PRcargo clippy --all-targets -- -D warnings, with and without--all-features: clean.I didn't test with game data.
Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.
Pull request closed