Commit Graph

4 Commits

Author SHA1 Message Date
Adrià Franch 065280d58d fix(libkernel): map EPIPE on Linux and test send with MSG_NOSIGNAL on a closed peer
Case and test by hikazey in the PR thread.

Co-authored-by: hikazey <hikazey@users.noreply.github.com>
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 12:36:58 +02:00
Scott Schuster a2f9a50985 fix(libkernel): accept MSG_NOSIGNAL in send and sendto
send, sendto and sendmsg rejected every flag with EOPNOTSUPP, so callers
that pass FreeBSD's MSG_NOSIGNAL (0x20000) could not send at all. Accept
it: Windows sockets never raise SIGPIPE, and on Linux it maps to the
native MSG_NOSIGNAL. Other flags still fail with EOPNOTSUPP.

DOOM (PPSA99666) sends its upload server replies with MSG_NOSIGNAL and
closed every connection without an answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:36:58 +02:00
Jakub Krasuski cefdea7d14 fix(libkernel): report EINVAL, EACCES, ENOBUFS, ETIMEDOUT and EINTR from Linux sockets
The Linux branch of NativeError lacked five codes the Windows branch
already translates, so they fell through to EIO. bind on a bound socket
and accept on a socket that is not listening set errno to 5 on Linux
and to 22 on Windows.

Assisted-by: Claude Opus 5.5
2026-10-05 21:41:12 +02:00
Praetorian0420 e3eeac4a81 Implement network control and socket functionality improvements
- Enhanced the network control library to check for host addresses and update connection states accordingly.
- Added support for socket operations including connect, listen, accept, send, and recv in the UDP and TCP socket implementations.
- Introduced error handling for various socket operations, ensuring proper feedback for unsupported actions.
- Created comprehensive tests for both TCP and UDP socket functionalities, validating the expected behavior of the network stack.
- Refactored existing code to improve clarity and maintainability, including the removal of unused functions and the addition of necessary error checks.
2026-09-30 23:29:01 -05:00