Repository navigation
Conversation
Replace unconditional failure and shared task completion with a precision-checked kernel NTP query and independent SDK event lifetimes. Preserve real failure results and release the guest core across contended service locks.
Translate the Horizon IPv4 socket ABIs, retain generation-safe descriptor lifetimes and bound local discovery. Publish real guest contexts across blocking hooks using the existing per-thread gate stack. Add LDN discovery, membership and lifecycle plus local play-history registration from privately imported resources. Preserve upstream offline account and TLS boundaries. Synthetic and real loopback fixtures, ASan/UBSan, the full host suite, the production HLE registry, iPhoneOS compilation and synthesized resource-decoder tests pass. Mario Kart 3.0.5 hardware results are owner reports from the originating fork, documented separately from this rebased branch. No frontend, Nextendo integration or game/firmware data is included.
Keep the test thread heap-owned like production, release its handle after joining, and include it in the local-network test target. Stop socket fixtures at failed prerequisites rather than continuing with invalid descriptors.
Add the system permission description required by the native socket transport. Remove redirect-only resolver bookkeeping from the upstream local-only backend; no routing provider or UI is included.
…y copyout Kernel recvfrom copyout cannot invoke the guest dirty-page signal hook. Prepare the pending span before each receive attempt, including after readiness waits and partial stream reads, without retrying EFAULT or admitting unrelated invalid memory. The real dirty-tracker fixture passes 43 checks normally and under ASan/UBSan. Negative controls reproduce missing preparation and the wait boundary. The full host suites, iOS compile check and documentation checks also pass.
…e copyout The kernel getsockopt copyout cannot invoke the dirty-page fault hook. Prepare the validated result span without changing SetSockOpt inputs, invalid-memory failures, result sizes or errno translation. The expanded real dirty-tracker fixture reproduces 16 failures in 87 checks before this change and passes all 87 normally and under ASan/UBSan afterward. This synthetic reproduction does not establish a game disconnect cause.
Use owned DNSService queries and cancellation identities instead of leaving resolver work and late completions alive. Retire native references on one serial queue, fence finalization, and retain the offline and synchronous resolver paths.
Use owned DNSService queries and cancellation identities instead of leaving resolver work and late completions alive. Retire native references on one serial queue, fence finalization, and retain the offline and synchronous resolver paths.
Keep per-session read-only snapshots and scoped eligibility checks behind a default-off provider hook. Exercise startup, delivery lifetime and sanitizer failures with original offline fixtures; compose the TLS dependency without replacing upstream filesystem behavior.
Replace unconditional failure and shared task completion with a precision-checked kernel NTP query and independent SDK event lifetimes. Preserve real failure results and release the guest core across contended service locks.
Check Foundation fixture construction and bounded DER reads explicitly, initialize the filesystem fixture handle, and remove a fixed filesystem null-argument baseline entry. No new suppression or baseline expansion.
…tely Ordinary-buffer TLS, policy and resolver tests use the explicit no-tracker fixture hook. The real socket-copyout fixture keeps its registered dirty tracker and links the NSD backend needed by this stack.
I preserved upstream's readback allocation expectation and the existing explicit serial-table release. The LAN/LDN transport and tracked socket copyout corrections remain unchanged. Local network fixtures, 87 normal and sanitized copyout checks, 61 Metal geometry checks, and the documentation tests pass after the merge.
…stream-online-backend-proposal # Conflicts: # dm/host/Makefile # dm/host/hle_net_backend.c # dm/host/tests/Makefile # docs/agents/symptoms.md # docs/reference/services.md
…stream-online-backend-proposal
…stream-online-backend-proposal
…stream-online-backend-proposal # Conflicts: # dm/host/tests/Makefile
…stream-network-clock-main # Conflicts: # docs/agents/symptoms.md
|
@RobiiAragon thanks, good to hear a full Salmon Run shift worked over Nextendo. I'll keep Splatoon 3's adapter out of this PR. It's already well past the size where the contributing guide asks for a scope discussion first. Your three changes touch the patch step, the NSO rewriter and the route profile, so they'd be a PR of their own. I've saved your links for that. On UDP, this branch does something close to RC10 but not the same. When the game binds the same port again within the 5 s, it closes the parked host socket and binds a new one, so the options the game set carry over. RC10 hands the same host socket back, which also keeps a router mapping tied to that socket. Handing back the same socket sounds like the better choice, and I'd switch to it if a log shows a mapping getting lost. Like you, I haven't finished a match with either version, so that section stays marked untested. |
|
Thanks for keeping this branch up to date. I read the current head (
I can send any of these as a small patch to your branch if that helps. |
|
@sofianbll thanks for reading it this closely. Yes, patches to the branch would help. I checked your points against I'd rather keep Legends Z-A out of this PR, since a new game's delivery format adds to an already large change. It would fit well as its own PR on top of the pre-guest hook. The branch is |
|
Thanks for confirming the findings. I sent the CA patch first, followed by ZBIC, the sign-in deadline, and the TLS trace labels. I’m keeping Legends Z-A and its BCAT support for a separate PR. |
A cold service profile fails to build because the Git web raw link returns HTTP 403. Fetch the same file and revision through Forgejo’s raw API without following redirects. Keep the SHA-256 check and route trust unchanged. Checked the two public URLs and the DER digest. The offline service fixture covers an empty cache, digest rejection, cache reuse and a refused redirect. No game or online session was run.
A ZBIC main fails before the signed patch lookup because the adapter sends every compressed segment to LZ4. Use nso.load, leave the source and destination alone when no patch matches, and clear the compression flags when emitting an uncompressed copy. Checked a synthetic ZBIC module with and without a matching patch, with a mocked decoder. No game or online session was run.
A stalled sign-in request can hold the caller because its semaphore wait has no deadline. Cap the total transfer at 12 seconds and cancel on timeout. Stream replies into a 64 KiB buffer instead of letting the completion handler accumulate them. Checked a small JSON reply, advertised and streamed oversize replies, a stalled task and cancellation with a synthetic transport. No game or online session was run.
Scoped CA failures look the same in the verify trace because it only records the combined result. Add fixed labels for platform trust and strict X.509 failures. Leave the verification and guest result unchanged and do not log any peer data. Checked both labels with loopback TLS, plus the existing trace cap and errno tests. No game or online session was run.
packing/nextendo: fetch the pinned CA through the raw API
packing/nextendo: use the shared ZBIC module loader
nextendo/sign-in: bound request time and reply size
host/ssl: identify scoped CA verification failures
|
@sofianbll thanks, all four are merged into the branch: the CA source, ZBIC, the sign-in deadline and the TLS trace labels. I read each one before merging, and the branch is also caught up with seedds main now. I'm bringing the same four fixes to the fork's main and to #2744, since both carry the same Nextendo code. Splitting Legends Z-A and its BCAT support into their own PR works for me. |
|
Thanks @eyasbzour (and @sofianbll and @RobiiAragon for the testing and fixes) for all the work getting Super Mario Bros. Wonder sign-in and Mario Kart 8 Deluxe races running over Nextendo! We're closing this PR rather than trying to land a 154-file, 13,000+ line stack in one merge. We checked the branch state, recent thread updates, and current The independently proven host networking fixes—such as guest |
|
@seedds thanks for going through it, and for laying out the split. That makes sense to me. One question before I send them. I checked the four networking fixes against current main, and all of them change the network-mode transport that #961 adds ( Which would you prefer: small PRs to #961's branch so @RobiiAragon can take them in, or a small network-mode transport PR against main first, with each fix as its own PR after it? The Nextendo provider, CA/ZBIC and sign-in will stay in my fork either way. |
|
Thanks @seedds for reviewing the stack and laying out the split, and thanks @eyasbzour and @sofianbll for all the testing on Wonder and Mario Kart 8 Deluxe. On @eyasbzour's question: please don't send PRs to #961's branch. Both #961 (10k lines) and #846 (4k lines, which combined The second option makes much more sense:
@eyasbzour if you want to send that initial network-mode transport PR (or any of the four socket PRs once it lands), go right ahead — otherwise I'm happy to extract the minimal transport slice from #846 against current |
|
@RobiiAragon thanks, that plan works for me. I'll take the transport PR: it's the slice my branch has been running Wonder and MK8D on, so the fixes can stack straight onto it. I'll put it on current main's |
|
@RobiiAragon looking at it again, the transport on my branch is your code from #846/#961 (4866c59, plus the copyout fixes 68e649c and c2b1792), so it makes more sense for you to extract it. Please go ahead with the minimal slice against main. The cancellable resolver is yours too (d20190d), so that one is yours to send. Once your transport PR is up, I'll send my fixes on top of it, one PR each: errno, RecvMsg/SendMsg, EventFd in the socket table and default-route IP. One thing I noticed while looking: the transport depends on |
|
@eyasbzour thanks. The transport slice is up as #3324, against current It's off by default ( On Your errno, |
This builds on #961 (RobiiAragon's opt-in online backend), which is still open, so until #961 merges the diff shows its roughly 10k lines too. The commits that are new here:
b8e25957Serve gRPC's name lookup and RecvMsg/SendMsg in a network modeaa03bca5Set the game's own errno on a failed socket call; RecvMsg/SendMsg edge cases8aace781Merge seedds/main (465 commits; notes below)51c46eceRegenerateddocs/agents/symptoms.mdf1afbb84EventFd in a network mode is a slot of the transport's socket table8a36c156,e3fa880aMerge seedds/main again (no conflicts)e6d91b7fThe BCAT title IDs come from the build instead of the host source (test_no_title_ids_in_the_host), and three tests define the clock and wait symbols that main'shle_os.candhle_thread.cnow provideae3a5f02iOS online: the game is told the address of the adapter the internet route uses, not the first one listedfb1d0b3e,b8bec5a9,cb5bdacdTests that broke after merging main:t_oe_handoffstubs whathle_oe.cnow calls,t_nextendo_accountlets the SDK build the AsyncContext, andt_save_synccompares the device withhw.model(a CI runner is aVirtualMac2,1)9b0ae7b9Merge seedds/main67e62a1bNextendo online: sign-in, signed game patches, service profile and launcher7f9e8736Nextendo mode: keep a closed UDP port briefly; ICMP reports on UDP receives are no datagram yet7ab7b40dservices.md: the sign-in is MIT with a build-time client IDfc73a5a4,72fe137bReview fixes: the UDP rebind and send, one refresh at a time (flock), no second refresh at sign-in, SO_NOSIGPIPE on the loopback listener, a failed refresh keeps the current token until it expires, GetNickname as a wait hook, one /api/me fetch per account, presence requests in ordercd11b50ft_pollwait: a 60 s hang guard and unbuffered PASS lines. A slow runner stretched its short sleeps past the 20 s alarm twice in a row on this branch, in both the plain and the ASan jobc1f67b53Service profile: Mario Kart 8 Deluxe's NEX server presents a self-signed certificate, and its routes now accept exactly that certificate17ad015aMerge seedds/main (t_save_synctakes main'shw.modelcheck)931bc841t_mii_sysdata, new on main, includeshle_fs.c, which weak-imports Propose opt-in online service backends and BCAT delivery #961's BCAT provider. It now includesbcat_absent.h, ast_fs_stub.cdoes, so it linksde960fd2Merge seedds/main (no conflicts)3798ea9e,3c7b6af5A row forDM_EXFAT_DIR, which main's16af055bread without one, then a merge of seedds/main that keeps main's own row from210acc66c5188fcaThe host asks Nextendo why it refuses online play, and the account API uses the OAuth access token (/api/meanswered 401 to the nx2 game token). That was too broad;1d3da23fand93ab5278choose the token per route22bfea82Merge seedds/main (no conflicts)407d44c7The account's play time, Mii and activity on Nextendo7a51a148docs/agents/symptoms.mdregeneratedeb3bdbf9Merge seedds/main. Main's The network clock reads the host's clock, as the user clock, so saves dated by it are no longer dated 1969 #2359 and Propose opt-in online service backends and BCAT delivery #961 both took over the network clock'sGetCurrentTimeandIsAccuracySufficient(below)6f7ff687The game token's expiry and the id token'siat,nbfandexpare judged and stamped by Nextendo's clock: the offset comes from theDateheader of Nextendo's answers, and a device clock a minute or more off is logged3df926e0A host thread's native wait before the guest threads exist does nothing. The start-of-session work in407d44c7began on a background thread while the modules loaded, beforesvc_thread_main_initmadeg_keythr, andpthread_getspecific(0)on Darwin is the thread's own pthread structure, never NULL. The wait took that thread for a guest thread, and Wonder stopped at a different place in each run. Our bug, found on a device build of this branch's code1dd8f85aMerge seedds/main (no conflicts)89034fadMerge seedds/main, thene1bb0155:t_oe_handoffstubsdm_gfx_quit_begin, whichhle_oe.ccalls since main's3e628a0dc829a300Merge seedds/main with its offline UDP socket service (72047f1a). Offline, everynn::sockethook now goes to main's process-local service (dm_sk_*); an explicit network mode goes to the transport (dm_net_*). Calls the local service has no form for (Listen, Accept, RecvMsg, SendMsg) fail offline with ENETDOWN. Both sides set one errno (dm_net_errno) and the game's errno at the hook boundary.t_net_loopbackgets the backend stubst_net_eventfdalready had and links the network sources6b1c4012,3537bfd3Where main left a line as it was and only this branch changed it, the branch's version stays: offline ENETDOWN is 100, and an endless Poll on nothing blocks instead of returning 0 after 100 ms.t_netdefinesdm_host_workfor the local service's lock and checks the offline default with a TCP socket, since a UDP socket is now the local service. One open question about errno numbers. The local service's own errors use FreeBSD's (EAGAIN 35, EMSGSIZE 40) and the transport uses Linux's (EAGAIN 11, EMSGSIZE 90). I think Horizon gives the Linux ones. Wonder's gRPC sets 97 (EAFNOSUPPORT on Linux, 47 on FreeBSD) when it drops IPv6, and after a non-blocking connect it checks for EINPROGRESS, 115 on Linux and 36 on FreeBSD. Online play works on a device with the Linux numbers. Ryujinx's BSD service also answers with Linux error codes. The two never mix in one run, since offline only the local service sets errno and a network mode only the transport does, so I left your numbers as they are. If you want the local service on Linux numbers, it is a change to its constants, andt_net_loopbackcompares against the names, so it passes either way8f4aebb6Merge seedds/main with its one-object-per-source host build. The new compile and link lines keep this branch's pinned libcrypto flags and archive,-lzandSecurity, thehle_*.mtakeovers inSRC, and--validate-hleafter the link.gen_build.pytakes main's command order and still collects the libcrypto archive4fb16040Presence no longer holds up the game. Publishing it used to send the request on the calling thread and wait for Nextendo's answer. Now the newest body goes on one serial queue and the call returns at once; a failed publish is logged once. All account API requests share one HTTPS session6d4b3713The transport watches each UDP socket. When one that was receiving gets nothing for 2 s, it logs that once with the counts so far, and again when datagrams come back. It never logs an address. A send or receive the host refuses logs its errno once. This is for telling a peer that went quiet apart from a host error (below)4e7a2c89Play time never ran in Mario Kart 8 Deluxe on the iPhone. Its modules loaded before the launcher setDM_NETWORK, soloader.csaw no Nextendo and skipped the session start. The first game credential now starts the session too, once either way, and each total sent is logged1d3da23f,93ab5278Each Nextendo account route now gets the token nextendo.network takes there. I asked each route live with both tokens:/api/me,/api/friendsand a/api/historyread take the OAuth access token only, a/api/historywrite and/api/online-statustake the nx2 game token only, and/api/profiletakes neither (it needs theprofilscope). With the access token everywhere, play time was read but every write was refused, and the online status was never asked.dm_nextendo_api_bearernow takes the route, andt_nextendo_accountchecks the choice562541f5No play time is sent any more. A few hours after that check, Nextendo closed history writes to every third-party app: the nx2 token now gets 403 ("Le jeton de jeu d'une application tierce n'ouvre pas cette route") and the access token 401, and Nextendo's developer wiki says writing the history is not open to OAuth tokens. The one-minute sender, the history resource and the history-write token choice are gone, andt_nextendo_apichecks that history is refused before any requestde882566A comment and the docs said/api/profiletakes only a web session. It needs theprofilscopea5a4c9c1The sign-in now asks for theprofilscope, so/api/profilecan hand the account's Mii to the game8cf0713bNextendo's signed patch catalog (revision 10) added a Splatoon 3 patch withpatch_version2, and the catalog check refused the whole catalog, so every Nextendo build stopped at the patch step, Mario Kart 8 Deluxe included, though it has no patch. A patch in another format is now left alone, and a build is refused only when its own game's patch is in oneWhy
Games whose online code is NPLN (Super Mario Bros. Wonder and other recent titles) talk to their servers over gRPC, which links its own OpenSSL and does TLS itself over the C socket interface. With #961 alone, Wonder's online menu fails with 2321-4992 (gRPC's UNAVAILABLE) at four separate points. Each fix below sits at the SDK level, with no game offsets in the code, so it applies to any game that makes the same calls.
nnsocketGetAddrInforeturned EAI_FAIL whenever an SDK exports both C++GetAddrInfooverloads, and Wonder's does. The C call takes the plainaddrinfolayout. In Wonder 1.2.1's SDK it branches straight to that overload (sdk+0x1481c0), so the C resolver now uses that layout whenever the SDK has it.gRPC's TCP endpoint reads and writes only through
RecvMsgandSendMsg, which were unsupported. They now scatter and gather through one host buffer with Horizon's 0x30-bytemsghdr. A message over 16 MiB moves in part on a stream socket, as a real socket may, and fails with EMSGSIZE on a datagram one. A datagram longer than the iovecs is cut and reported withMSG_TRUNC. Ancillary data is refused rather than dropped.On Horizon,
nn::socket's errno is the C library's:detail::SetLastErrnowrites*__errno_location(). The host kept only its own copy. gRPC sets EAFNOSUPPORT itself when it falls back from IPv6, then reads errno after a non-blocking connect, so it took that stale value for EINPROGRESS and dropped the address. Every socket hook that fails now also writes the game's errno, andGetLastErrnoreads it.gRPC wakes its pollers with an event descriptor and polls it together with its sockets. In a network mode
EventFdfailed, and main's offline table numbered its descriptors from 0, the same as the transport's sockets. An event descriptor is now a slot in the transport's socket table, backed by a local socket pair, so Poll and Select see sockets and event descriptors together. Offline nothing changes.On iOS,
net_routehas no routing table to read, so the adapternifmreports was the first IPv4 onegetifaddrslists. With mobile data on, that is usually the cellular one, even while the phone plays over Wi-Fi. Pia gives the addressnifmreports to the other players as its local candidate for a direct link. In a Nextendo session the adapter is now the one whose address a UDP socket connected past the local networks gets (connecton UDP sends nothing). If no adapter has that address, any adapter is used, as before. The chosen adapter's name is logged when it changes.Name lookups and resolver options are logged once, in red when they fail, so the next game that stops before its first socket shows why.
What a player needs to go online
#961 takes the account from a credential provider the app installs and routes only the hosts a service profile names. Neither existed in the repository, so nothing could sign in. With these commits a build made with
--nextendoworks once the player signs in. NEX games (Mario Kart 8 Deluxe) and NPLN games (Wonder) go through the same code.dm/host/nextendo_login_apple.inc, MIT): OAuth with PKCE and a127.0.0.1redirect, the refresh token in a private 0600 file, and a game token from/api/nex-tokenwhen a game asks. Refreshes take a file lock, so the Mac tool, the launcher and the game never spend the same refresh token twice. When Nextendo refuses an account,/api/online-statussupplies the reason, which becomes the error text./api/oauth/userinfomust name the same account as the game token. On the Mac,make -C dm/host nextendo_loginand thendm/host/nextendo_login sign-in. On the iPhone, the launcher's Online section opens Nextendo's page in anASWebAuthenticationSession, and a listener in the app takes the loopback redirect. No token is logged.DM_NEXTENDO_CLIENT_ID. The Mac reads it from the environment, andbuild_ipa.shwrites it into the app's Info.plist asDMNextendoClientID. A build without it cannot sign in, and the error says so. This repository ships no client ID. Whoever publishes builds registers a public application at nextendo.network/developers, and Nextendo's sign-in page shows that application's name.dm/tools/nextendo_patches.py(after NX Port Studio, MIT) fetches Nextendo's signed patch catalog and checks its Ed25519 signature withnextendo_verify.swift. If the catalog lists the exact main build (all 32 bytes of the build ID) and every guarded byte matches, it patches a copy of main. The host maps that copy only in Nextendo mode (loader.c; on the iPhone it is modulenmain), so offline and LAN play keep the original. Wonder 1.2.1 has such a patch. Mario Kart 8 Deluxe 4.0.1 is listed without one.dm/tools/nextendo_services.pywrites the public profile fromdm/net/nextendo-services.json: routes, the provider CA checked by SHA-256, and the manifest. When the player has no firmware certificate store, that CA answers the SSL service's built-in certificate requests. A game whose own TLS takes its roots from the store (Wonder's gRPC) then needs nothing beyond the sign-in.g2b309e01-lp1.s.n.srv.nintendo.netandg2df33d01-lp1.p.srv.nintendo.net) presents a self-signed certificate, CN=nintendo-private-server, with no SAN. No CA in the profile issues it, so the SSL service'sverify_peerfailed and the game showed 2306-0502. Those rows are nowpinned-exactroutes carrying the certificate's SHA-256, and the DER file sits indm/net/nextendo-pins/.dm_nextendo_x509_verify_pinfrom Propose opt-in online service backends and BCAT delivery #961 accepts the connection only when the peer sends that exact DER, inside its validity dates, with a valid self-signature and a strong enough key. Every other host still goes through normal verification. Mush8 accepts any certificate from that server; this accepts one./api/online-statuswith the nx2 game token (it answered 401 to the access token), once after the first game credential and again when the game shows a 2306-08xx error, and logs the answer in words. No token is logged./api/me. Nextendo's routes take different tokens./api/me,/api/friendsand presence take the OAuth access token from the sign-in's last refresh and answer 401 to the nx2 game token, while/api/online-statustakes only the nx2 token, so the host picks the token per route. The launcher fills in a country or birthday when the account has none, and the player can type a name of up to 10 characters. The game also gets the online membership and the BaaS id token with the NEX proof.UserPresence::SetDescriptionruns the SDK's own setter. Presence is posted again every 45 s while a game has published one, because Nextendo stops showing a player whose presence stops arriving. A refused friends or presence request logs its HTTP status./api/profile) joins the console's Miis in the game's Mii database when its data CRC holds and no console Mii has its create ID. Nothing is uploaded. The presence'sapp_detailis now the game's ownSetDescriptiontext, read from the application field (key and value strings in turn, undersys_description, as the SDK'sPresenceAccessorlays them out)./api/profileneeds theprofilscope (Nextendo's scope table lists it, and this client may use it), so the sign-in now asks for it. Players see one more line on Nextendo's consent screen, and a sign-in made before this change has to be redone before the Mii can be read. No device run has read the Mii yet.nifm::GetCurrentProxySettingsucceeds with every field zero in a network mode, the same as a console with no proxy. Wonder's NPLN code returns an error when it fails.--nextendobuild, where it is the default) and an Online section with the sign-in and a birthday picker. The Network row is now shown for every game.patches.pyputs an observation gate on gRPC'sgrpc_error_create, because Nintendo's gRPC has its logging compiled out.The sign-in was first written in the fork after Mush8 (GPL-3.0). It has since been rewritten under MIT from Nextendo's public OAuth interface. Mush8, Ryujinx-Nextendo and NX Port Studio were used for facts: which endpoints Nextendo has, the token shapes, and which calls a game makes. No code was taken from Mush8.
UDP in Nextendo mode (untested)
7f9e8736andfc73a5a4are separate because no log has shown they are needed yet. When a game closes a bound, unconnected UDP socket, the host socket stays open for 5 s. Without this, datagrams that arrive in between are answered with ICMP port unreachable, where a console would drop them. A bind to that port in that time closes the parked socket and binds the game's new one, so the options the game set on it stay. The host also hands an earlier datagram's ICMP report to the next call on a UDP socket, which Horizon does not do. On a receive it counts as no datagram yet. On a send, which then sent nothing, the datagram is sent again once. All of this applies only in Nextendo mode, for peer-to-peer sessions such as Pia's.Why the watch in
6d4b3713: players dropping out of Mario Kart races. The logs show no host socket error, only shader stalls (up to 1.76 s at race load, about 0.3 s mid-race). Nextendo's own server code says about 23% of direct hole punches fail, and that 45 of 113 players never connected directly. Its relay works per pair, is off by default, and only opens for players on a volunteer list after two failed attempts. Its docs say the servers stay out of gameplay traffic. So a drop is most likely the direct link between two players, and the watch should show that as a socket going quiet with no host error.Merging main
Main's offline socket layer (the event descriptor table, Select as Poll over its sets, Star Fox's SDK 21 overloads) now sits under #961's transport, and the SDK 21 overloads go to the transport in a network mode. Main's ssl stubs stay out because #961's
hle_ssl.cserves those calls. The SDK 4GetPeerNameis registered once.hle_account.ckeeps main's SDK-builtAsyncContext: there is no constructor takeover, a context with Nextendo off answers as main's does, and a move constructor copies the vtable.hle_bcat.cdropsHLE_FORCE_BIG, since main now runs every takeover on the host stack.The network clock is split between the two. Main's #2359 reads the host clock in
GetCurrentTimeandnow(), so a game that dates its saves by the network clock gets the real date (Divinity: Original Sin 2 dated them 1969). #961 hadGetCurrentTimefail unless the kernel's NTP state was synchronized within a second. A Switch reads its network clock unsynchronized too, so main's version stays, andt_network_clockno longer checks the getter.IsAccuracySufficientand the availability task keep #961's kernel NTP check rather than main's fixed "no", since the host can tell whether its clock is synchronized. If you'd rather keep main's "no" there, it's a one-line change. This also changes offline play, not only a network mode: on main,AsyncEnsureNetworkClockAvailabilityTaskalways finishes with a failure, and with #961 it succeeds whenever the device's clock is synchronized. A game that checks it offline takes the "clock available" path (#961's author found Splatoon 2's calendar warning gone with it).Tested
4fb16040,6d4b3713and4e7a2c89ran on an iPhone: Worldwide races with other players for about 6 minutes with no dropped player (the UDP watch logged no 2 s silence during the races), and switching between docked and handheld mid-session was clean both ways. Its first matchmaking attempt ended in 2618-0519 with no datagram ever received from another player, and the next attempt joined. That build still wrote play time with the access token and was refused (401), which is how the per-route tokens were found. A later fork build with1d3da23fand93ab5278(Mario Kart 8 Deluxe, 2026-11-15) loggedNextendo allows online play for this accountand raced online, and its history write got 403, which led to562541f5.t_netcovers the gathered and scattered round trip, EMSGSIZE,MSG_TRUNC, the resolver layout, the game's errno on a failed call and on an empty event read, mixed Poll and Select over sockets and event descriptors, and the proxy answer.make -C dm/host/tests nextendo-accountalso compiles the Mac sign-in tool.test_nextendo_patches.pyandtest_nextendo_services.pycover the catalog checks and the profile. Tests workflow on the fork for this head, every job green: https://github.com/eyasbzour/nxnative/actions/runs/43757913058Not in this PR: VPN play and the local-wireless room broadcasts, the fork's networking diagnostics ring, and the fork's build workflow (which sets the client ID).