Repository navigation
fix(libSceNet): store SO_ONESBCAST in sceNetSetsockopt - #6886
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
jotitadev
left a comment
There was a problem hiding this comment.
First Linux run (the PR was tested on Windows only).
Machine: Linux x86_64, i7-8700, Ubuntu 26.04, GCC 15.2, Release, BUILD_TESTING=ON.
Head a51d7dcce merged onto main 66e290f1c.
guest_sce_net,guest_net_ctl,guest_netctl_ap_dialog: pass.- Test-only on
main(onlyGuestSceNet.cppfrom the PR):guest_sce_netaborts. With theCheckOnesBroadcast()call commented out, the same binary passes, so the abort comes from the new check (EOPNOTSUPPon0x10000). - Full non-GPU suite (
-E "^agc|gpu|vulkan|video_out"): 648/650, same as base. The two failures (file_writer_binary/file_writer_text) are known on this host and also fail on base. One run showed aguest_host_standard_errortimeout under load; it passed on rerun and in a second full-suite run.
No Linux-specific difference found.
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
Rebase handoff — rebased onto current Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
To pick it up: Head is |
a51d7dc to
4b65688
Compare
|
Thanks for the rebase and the full-suite run. I pushed |
What
Accept and store
SO_ONESBCAST(0x10000) at theSOL_SOCKETlevel insceNetSetsockopt, and read it back insceNetGetsockopt.Call of Duty: Black Ops (PPSA34501) sets this option when it starts its local server for campaign and zombies.
Previously,
sceNetSetsockoptfailed withEOPNOTSUPP, and the game later crashed in itsServerthread while the mission loaded:The implementation now:
0.sceNetGetsockopt, as shadPS4 does.intfails withEINVAL, and other unknown options still fail withEOPNOTSUPP.libSceNettechnical debt.Sends ignore the option, so this is a compatibility fallback, not the broadcast behaviour itself. FreeBSD 11.4's ip(4) documents the like-named
IP_ONESBCAST. With it, a send to an interface's directed broadcast address, such as192.168.2.255, leaves through that interface with its destination rewritten to255.255.255.255. Here host routing picks the interface and the destination is not rewritten. shadPS4 stores the option the same way and does not change sends either. Its TODO reads the option the other way round (255.255.255.255converted to the interface broadcast address) and notes that "hosts deliver it on the LAN anyway". The exact PS5 semantics, including the value read back, remain unverified.Tested
Windows 11 Pro, Ryzen 9 9900X, RTX 2060.
Serverthread when campaign or zombies game loads.guest_sce_net,guest_net_ctlandguest_netctl_ap_dialogpass, including the newCheckOnesBroadcast.Checklist
main; no other open PR implements the same functions (no open PR handles SO_ONESBCAST; fix(libSceNet): read SO_RCVTIMEO and SO_SNDTIMEO as a timeval in sceNetSetsockopt #5967, fix(libSceNet): set an option on a libkernel socket through sceNetSetsockopt #6142 and fix(libSceNet): stop Sackboy loading retries on peer sockets #5836 change sceNetSetsockopt/sceNetGetsockopt for other options)NotImplemented_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)