Fix lan rooms on android

This simple change makes lan discovery work on android again.
The is_lan_address function was meant to filter out duplicate rooms only anyway and this change shouldn't harm anything

The responses on android are seen as IPv6 mapped IPv4 addresses so this is needed for this to work anyway

I/RetroArch: [Discovery] Responnse received on LAN interface ::ffff:192.168.1.241.
I/RetroArch: [Netplay]: Connecting to ::ffff:192.168.1.241|55435 (deferred)
This commit is contained in:
Andrés 2022-05-31 22:39:10 -05:00 committed by GitHub
parent b8d9070c9b
commit cf2ecf506c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -333,13 +333,17 @@ static bool netplay_lan_ad_client_response(void)
/* And that we know how to handle it */ /* And that we know how to handle it */
#ifdef HAVE_INET6 #ifdef HAVE_INET6
#ifndef ANDROID
if (their_addr.ss_family != AF_INET) if (their_addr.ss_family != AF_INET)
continue; continue;
#endif #endif
#endif
if (their_addr.ss_family != AF_INET)
{
if (!netplay_is_lan_address( if (!netplay_is_lan_address(
(struct sockaddr_in *) &their_addr)) (struct sockaddr_in *) &their_addr))
continue; continue;
}
#ifndef HAVE_SOCKET_LEGACY #ifndef HAVE_SOCKET_LEGACY
if (getnameinfo((struct sockaddr *) if (getnameinfo((struct sockaddr *)