fix(libkernel): return EPROTOTYPE for a socket type inet does not have #7151
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7151"
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 Bonjourcestmatt on 2026-10-17T14:02:52Z.
What
socket()returnedEPROTONOSUPPORTfor every type it does not create. FreeBSD 11.4'ssocreatereturnsEPROTOTYPEwhen no protocol is found, the protocol is 0 and the type is not 0, andEPROTONOSUPPORTwhen a protocol was given.The inet domain (
in_proto.c) hasSOCK_RAWentries in every kernel and aSOCK_SEQPACKETentry only withSCTP, and nothing else. So only a type it never has (for exampleSOCK_RDMor 99) with protocol 0 now returnsEPROTOTYPE.SOCK_RAWandSOCK_SEQPACKETkeepEPROTONOSUPPORT, because whether the console creates them is not known; this,IPPROTO_UDPLITEandAF_UNIXare listed indocs/dev/debt/libkernel.md.Not measured on a console.
Tested
guest_socket*tests pass, including the newSocketTypeErrors(unknown types and mismatched protocols forAF_INETandAF_INET6). The checked paths return before any host socket call.python3 tools/check_conventions.py --base origin/main: passed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T14:35:04Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mdcore/libs/tests/GuestSocketDescriptors.cppcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppcore/libs/tests/GuestSocketDescriptors.cppdocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppcore/libs/prx/libkernel/Socket/src/Udp.cppcore/libs/tests/GuestSocketDescriptors.cppdocs/dev/debt/libkernel.md