Merge pull request #13994 from fr500/master

fix previous PR
This commit is contained in:
LibretroAdmin 2022-06-01 07:37:37 +01:00 committed by GitHub
commit 4a21553f06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -333,17 +333,23 @@ 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
/* skip the early return on android*/
#ifndef ANDROID #ifndef ANDROID
if (their_addr.ss_family != AF_INET) if (their_addr.ss_family != AF_INET)
continue; continue;
#endif #endif
#endif #endif
if (their_addr.ss_family != AF_INET)
{ /* NOTE - Even if the IP address family is IPv4 it will be seen as an IPV6
if (!netplay_is_lan_address( mapped IPv4 address on Android, so until someone can fix netplay_is_lan_address
(struct sockaddr_in *) &their_addr)) let's skip that check for that use case. The netplay_is_lan_address function
continue; was just meant to filter out bogus entries caused by TAP adapters or VNET adapters
} */
#ifndef ANDROID
if (!netplay_is_lan_address(
(struct sockaddr_in *) &their_addr))
continue;
#endif
#ifndef HAVE_SOCKET_LEGACY #ifndef HAVE_SOCKET_LEGACY
if (getnameinfo((struct sockaddr *) if (getnameinfo((struct sockaddr *)