feat(libkernel): support SO_LINGER and IPV6_V6ONLY in setsockopt #1090
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1090"
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 boykopovar/AnyPS5. Originally posted by kjhq on 2026-10-07T10:35:56Z.
What
setsockoptaccepted only theSOL_SOCKEToptions in the existing table and returnedENOPROTOOPTfor everything else. This adds two options:SO_LINGER(SOL_SOCKET, 0x80): the guest's{int l_onoff; int l_linger;}(8 bytes) is converted to the hostlingerstruct, whose fields areu_shorton Windows. Another length or a linger time outside 0..65535 isEINVAL.IPV6_V6ONLY(IPPROTO_IPV641, option 27): passed to the host on IPv6 sockets; on an IPv4 socket or with a length other thansizeof(int)it isEINVAL.Other levels and options still return
ENOPROTOOPT.guest_udpcovers both options, their invalid lengths and families, and an unknown option atIPPROTO_IP.Tested
Debian 13 (WSL2), GCC 14.2.0, Release:
guest_udpandguest_tcppass.The same change was part of a local build used to run PPSA17221 (Minecraft) on Windows 11, where it compiled with WinLibs GCC; it was not tested on its own there. Not tested with Windows
ctest.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by kjhq on 2026-10-07T11:30:47Z.
Closing: a leave-one-out run shows PPSA17221 (Minecraft) reaches a loaded world without this change, so no title is known to need it yet. I'll reopen with the title ID and log line if one does.
Pull request closed