sceNetAdhoc: A relay PDP send off the network doesn't need a session

Off the network the datagram reaches nobody and the send succeeds, but
the session was recovered first, and a send whose session wasn't up
returned WOULD_BLOCK (pspautotests net/adhoc/pair/vanish, PDP send after
leaving).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-31 09:04:00 +01:00
1 parent 56148606e5
commit a1a197e685
1 file changed
+6 -5
+6 -5
View File
@@ -181,17 +181,18 @@ bool RelayTransport::PdpTakeDatagram(int id, SceNetEtherAddr *mac, uint16_t *por
}
static int pdp_send_postoffice(int idx, const SceNetEtherAddr *daddr, uint16_t dport, const void *data, int len) {
// Out of the group, it goes into the air and reaches nobody (pspautotests net/adhoc/pair/vanish),
// whether or not the relay session is up.
if (offAdhocNetwork() && !isLocalMac(daddr)) {
return 0;
}
AdhocSocket *internal = adhocSockets[idx];
void *pdp_sock = pdp_postoffice_recover(idx);
if (pdp_sock == NULL) {
return SOCKET_ERROR;
}
// Out of the group, it goes into the air and reaches nobody (pspautotests net/adhoc/pair/vanish).
if (offAdhocNetwork() && !isLocalMac(daddr)) {
return 0;
}
SceNetEtherAddr fixed_daddr = *daddr;
fixGameMac(&fixed_daddr);