mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-18 18:42:46 +00:00
Also count link-local addresses as local
This commit is contained in:
parent
d833933aaa
commit
cd06559c66
@ -511,7 +511,8 @@ public class ComputerManagerService extends Service {
|
||||
// This will tend to be wrong for IPv6 but falling back to
|
||||
// remote will be fine in that case. For IPv4, it should be
|
||||
// pretty accurate due to NAT prevalence.
|
||||
return InetAddress.getByName(str).isSiteLocalAddress();
|
||||
InetAddress addr = InetAddress.getByName(str);
|
||||
return addr.isSiteLocalAddress() || addr.isLinkLocalAddress();
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user