[PR #3347] [MERGED] Net: Fix various socket-related issues #3403

Closed
opened 2026-02-27 22:03:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3347
Author: @StevenMiller123
Created: 7/29/2025
Status: Merged
Merged: 7/30/2025
Merged by: @georgemoralis

Base: mainHead: sockets


📝 Commits (10+)

  • d2d5e54 Store platform-specific level in a separate variable
  • a7baaab Define ORBIS_NET_IPPROTO_IPV6
  • 5341c85 Fix error codes
  • 9732aac Remove duplicate getsockname implementation
  • 7345847 Use separate mutex for ReceivePacket calls
  • db1b859 Add missing error codes
  • 7b26057 Clang
  • f81bfeb Minor nit
  • e84b064 Set __Error() in ConvertReturnErrorCode
  • e88bb65 Set errno on stubbed P2P socket error returns.

📊 Changes

8 files changed (+79 additions, -82 deletions)

View changed files

📝 src/core/libraries/kernel/file_system.cpp (+6 -18)
📝 src/core/libraries/kernel/kernel.cpp (+2 -21)
📝 src/core/libraries/network/net.h (+1 -0)
📝 src/core/libraries/network/net_error.h (+4 -4)
📝 src/core/libraries/network/p2p_sockets.cpp (+6 -0)
📝 src/core/libraries/network/posix_sockets.cpp (+34 -21)
📝 src/core/libraries/network/sockets.h (+1 -0)
📝 src/core/libraries/network/sys_net.cpp (+25 -18)

📄 Description

This fixes a variety of socket-related issues I've noticed while reviewing code changes in recent network-related PRs. As far as I'm aware, this should have minimal conflict with the remaining changes in #3231

This makes the current crash in Minecraft (CUSA00744) more descriptive, fixes early deadlocks in Cyberpunk 2077 (CUSA16595), and should also fix a deadlock reported by @psucien on the shadPS4 Discord server.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3347 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 7/29/2025 **Status:** ✅ Merged **Merged:** 7/30/2025 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `sockets` --- ### 📝 Commits (10+) - [`d2d5e54`](https://github.com/shadps4-emu/shadPS4/commit/d2d5e54450a862dc244f950c3c0a9c8caa20c299) Store platform-specific level in a separate variable - [`a7baaab`](https://github.com/shadps4-emu/shadPS4/commit/a7baaab8f419b62e4b1f57a984a7f28677fc26b0) Define ORBIS_NET_IPPROTO_IPV6 - [`5341c85`](https://github.com/shadps4-emu/shadPS4/commit/5341c859f6c3404abc3d0a0e4964caf7a934b33e) Fix error codes - [`9732aac`](https://github.com/shadps4-emu/shadPS4/commit/9732aac3bc9ce945a3855c017f49b3fee5fd9744) Remove duplicate getsockname implementation - [`7345847`](https://github.com/shadps4-emu/shadPS4/commit/7345847bba0512f18c5d7d85a949d914ee40746e) Use separate mutex for ReceivePacket calls - [`db1b859`](https://github.com/shadps4-emu/shadPS4/commit/db1b8593cbc44e3c037e7d36bf93f0c909de8d31) Add missing error codes - [`7b26057`](https://github.com/shadps4-emu/shadPS4/commit/7b26057f18710f7a9472c0511e651d1c9e6b6961) Clang - [`f81bfeb`](https://github.com/shadps4-emu/shadPS4/commit/f81bfeb1d2407843d4bc76944751fa2d43fcc805) Minor nit - [`e84b064`](https://github.com/shadps4-emu/shadPS4/commit/e84b0640261f119ebfea97eaff6aa33936f0b30b) Set __Error() in ConvertReturnErrorCode - [`e88bb65`](https://github.com/shadps4-emu/shadPS4/commit/e88bb657c736bbeeb39ccfed897b56a6f995e019) Set errno on stubbed P2P socket error returns. ### 📊 Changes **8 files changed** (+79 additions, -82 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/kernel/file_system.cpp` (+6 -18) 📝 `src/core/libraries/kernel/kernel.cpp` (+2 -21) 📝 `src/core/libraries/network/net.h` (+1 -0) 📝 `src/core/libraries/network/net_error.h` (+4 -4) 📝 `src/core/libraries/network/p2p_sockets.cpp` (+6 -0) 📝 `src/core/libraries/network/posix_sockets.cpp` (+34 -21) 📝 `src/core/libraries/network/sockets.h` (+1 -0) 📝 `src/core/libraries/network/sys_net.cpp` (+25 -18) </details> ### 📄 Description This fixes a variety of socket-related issues I've noticed while reviewing code changes in recent network-related PRs. As far as I'm aware, this should have minimal conflict with the remaining changes in #3231 This makes the current crash in Minecraft (CUSA00744) more descriptive, fixes early deadlocks in Cyberpunk 2077 (CUSA16595), and should also fix a deadlock reported by @psucien on the shadPS4 Discord server. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:03:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3403
No description provided.