Commit Graph
27 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 8a48a157d4 sceNetResolver: Don't fault on a NULL address, and check arguments
sceNetResolverStartNtoA with a NULL address pointer wrote to address 0
and stopped the game. From pspautotests net/inet/offline, recorded on a
PSP: a NULL name or address gives INVALID_PTR, an empty name 0x80410418,
a NULL buffer in Create INVALID_PTR, and Stop with nothing running
ALREADY_STOPPED (the check was inverted). PollAsync and WaitAsync check
the resolver ID, and PollAsync its status pointer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 09:52:22 +01:00
Henrik RydgårdandClaude Opus 5.5 455209b43e Net: Fix use-after-pop, the resolver after loads, inet sockaddr/poll
- The apctl, NpAuth and NpMatching2 event loops kept references to the
  front of their deque after popping it, so callbacks could get the
  next event's arguments. NpMatching2 also dereferenced its optional
  opt param when it was null.
- The resolver was left stopped after any savestate load or reboot,
  which broke Outrun 2006 (it relies on it starting out running).
- Getpeername/Getsockname with a namelen under 2 copied a negative size.
  They now write the PSP's 16-byte sockaddr truncated to namelen, with
  sa_len 16, as pspautotests net/inet/poll shows on hardware.
- Poll handed an fd that isn't open (-1) to FD_SET. It now reports
  POLLNVAL for it and counts it, as on hardware (net/inet/poll).
  Setsockopt read past a local u32 for larger options, and passed a
  negative optlen to the host. A zero cmsg_len looped forever.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 08:43:28 +01:00
Henrik RydgårdandClaude Opus 5.5 a361dfc490 Drop unused Config.h and SmallDataConvert.h includes
Config.h is edited about 100 times a year and each edit recompiled 198
files; now 172. SmallDataConvert.h pulls in arm_neon.h and was included by
headers that don't use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:13:42 +02:00
Henrik Rydgård 0596ee97f6 More memory access cleanup 2026-08-11 20:14:01 +02:00
Henrik Rydgård 05b82d6ce4 Allow passing in a custom resolver to HTTPRequest and Connection. This inverts the bad dependency. 2025-08-06 00:16:34 +02:00
trigger 65d780b160 move ProcessHostnameWithInfraDNS out of sceNet 2025-07-31 13:03:57 -07:00
trigger 787cd9b119 infra dns for http requests 2025-07-27 17:47:36 -07:00
Henrik Rydgård ebcf6be42c When (successfully) using dyn_dns, remove fixed lookups.
Additionally some various cleanup.
2025-04-08 00:32:40 +02:00
Henrik Rydgård 89c0b5f20b sceNetResolver: Move error codes to enum, modernize logging 2025-04-07 22:16:32 +02:00
Henrik Rydgård 5f7b698012 Lots of logging and cleanup. 2025-04-07 21:40:52 +02:00
Henrik Rydgård 4e25f44eef Rename some module-related functions to include HLE where appropriate 2025-03-31 11:17:50 +02:00
Henrik Rydgård 28b2c7f540 HLE log rename part 1: Remove duplicate log functions. Return type should be determined by metadata. 2025-01-29 09:45:39 +01:00
Henrik Rydgård f69f94284f Move the hardcoded domains from sceNetResolver.cpp to the json. 2025-01-20 20:58:22 +01:00
Henrik Rydgård 9ba2a2f52d Resolver change for outrun 2025-01-17 12:35:07 +01:00
Henrik Rydgård 4757f8c872 Replace the NetResolver class with a simple struct 2025-01-17 09:44:13 +01:00
Henrik Rydgård b94b9b077d Refactor away the unnecessary wrapper from sceNetResolver 2025-01-17 09:38:20 +01:00
Henrik Rydgård 9d691d9866 Show revival team credits on the pause screen 2025-01-15 09:17:15 +01:00
Henrik Rydgård 05906bc8f3 Finish the format, actually use the things from it 2025-01-12 17:25:59 +01:00
Henrik Rydgård c5cde0f218 Remove "Secondary DNS" as a setting. 2025-01-12 17:25:57 +01:00
Henrik Rydgård fb99b6ff2b Logging cleanup in sceNetResolver 2025-01-11 10:22:23 +01:00
Henrik Rydgård 7e476fedf4 Warning fix, buildfix, logfix 2025-01-11 00:37:36 +01:00
Henrik Rydgård eced84a46b Use the new direct DNS resolver 2025-01-10 21:37:36 +01:00
Henrik Rydgård 293c087577 Add a new IPV4 direct DNS lookup function. Allows us to use the configured DNS directly. 2025-01-10 21:37:36 +01:00
Henrik Rydgård 2a0e3b1084 Move out a utility function to Common/Net 2025-01-09 09:23:33 +01:00
Henrik Rydgård 895d8eb7fa Try ANR2ME's sceNetInet implementation 2025-01-07 10:31:32 +01:00
White Blood Cell 87de5b6385 Add header to sceNetInet and audit hleLogError calls for SetLastError. 2025-01-04 17:56:58 +01:00
White Blood CellandAdamN ee0b0fce6c sceNetInet and sceNetResolver support.
Co-authored-by: AdamN <anr2000@gmail.com>
2025-01-04 17:28:36 +01:00