Repository navigation
Conversation
…eam socket, as libkernel's sendto does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
…eam socket, as libkernel's sendto does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
What
libkernel's
sendtoignores the address on a connected stream socket once its length passes (2 to 255 bytes) and it can be read, as FreeBSD 11.4'stcp_usr_sendonly connects to it on a socket that is not yet connected.sceNetSendto(andsceNetSendmsg, which calls it) converted and checked the address anyway, so an address of the other family failed withEAFNOSUPPORTand a short one withEINVAL. libkernel's debt entry for calls it forwards to a libSceNet socket lists this ("a destination on a connected stream is not ignored").On a stream socket whose host socket has a peer,
sceNetSendtowith an address now fails a length above 255 withENAMETOOLONGand below 2 withEINVAL, reads the address (EFAULTif it cannot), and then sends as it does without one. Other sockets are unchanged. The check callsgetpeernameinline rather than through a helper, because boykopovar#28534 adds aPeerConnectedhelper to the same file.GuestSceNet.cppgetsCheckConnectedStreamSendto: on a connected IPv4 TCP client,sceNetSendtowith anAF_INET6address and with an IPv4 address of another host and port, andsceNetSendmsgwith theAF_INET6name, all reach the peer; lengths 1 and 256 fail withEINVALandENAMETOOLONG, and an unreadable address withEFAULT. The fragment adds a libSceNet entry and drops the sentence from the libkernel entry.Tested
Commit fa81b15 on
main4a7fd1c, Release, in a workflow on my fork: https://github.com/Dr-Coconut/AnyPS5/actions/runs/46832768421windows-latest, image windows-2025-vs2026, WinLibs GCC 15.2.015.2.0posix-14.0.0-ucrt-r7) and Linux (GitHub-hostedubuntu-latest, image ubuntu-26.04, GCC 15.2.0), with the change:guest_sce_netpasses, and so do the eightguest_net_address_fault_*tests.Export.cpprestored tomainand the new case kept:guest_sce_netfails at line 2247, thesceNetSendtowith theAF_INET6address, withEAFNOSUPPORT(47); the controls pass.Not run on macOS. No title tested.
tools/check_conventions.pypasses andtools/debt_fold.py --checkaccepts the fragment.tools/pr_overlap.py --branchreported no overlap among the open pull requests it could merge; it could not compare eight that conflict withmain. Compared by hand: boykopovar#12682, boykopovar#12688, boykopovar#12700 and boykopovar#12965 rework blocking transfers and connects on Windows; boykopovar#5836 adds peer-socket types; boykopovar#16826 keeps close-on-exec infcntl; boykopovar#18108 changes socket options; boykopovar#23975 adds a DNS override. None of them changes howsceNetSendtotreats an address on a connected stream socket.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
Summary by CodeRabbit