fix(libkernel): return EDESTADDRREQ for a send on an unconnected UDP socket #2694
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2694"
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 husseinkad on 2026-10-10T11:07:15Z.
What
send,sendtowithout an address,sendmsgwithout a name andwriteon an unconnected UDP guest socket returnedENOTCONN(57) on Windows (Winsock'sWSAENOTCONN) andEIO(5) on Linux, where the host'sEDESTADDRREQhad no mapping. FreeBSD'ssosend_dgram(sys/kern/uipc_socket.c) returnsEDESTADDRREQ(39) for a datagram socket without a connected peer or address;ENOTCONNthere is only for protocols withPR_CONNREQUIREDsuch as TCP, which is unchanged.NativeErrornow mapsWSAEDESTADDRREQandEDESTADDRREQto 39, and a newSendError(type)mapsWSAENOTCONNto 39 for datagram sockets.sendandsendtouse it, andsendmsgandwritego through them.Tested
Windows 11 (10.0.26200), WinLibs GCC 15.2.0 r7, Release:
guest_udpgainssendandsendto(NULL, 0)on the unconnected sender expecting errno 39; it fails without the change.ctest -R "guest_(udp|tcp|poll|socket)": 5 of 5 pass.main's and this branch'sUdp.cpp(UDP4/UDP6 unbound/bound/connected in blocking and nonblocking mode, send/sendto/sendmsg/write, receive family, getpeername, shutdown, oversize payloads, TCP in every state, socketpairs, closed descriptors). The only differences areENOTCONNtoEDESTADDRREQon UDP sockets with no connected peer; TCP, connected UDP, socketpair,recv*,getpeernameandshutdownresults are identical.tools/check_conventions.py --base origin/mainpasses;tools/pr_overlap.py --branchreports no overlap.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 repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T11:08:44Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Pull request closed