mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +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
|
// This will tend to be wrong for IPv6 but falling back to
|
||||||
// remote will be fine in that case. For IPv4, it should be
|
// remote will be fine in that case. For IPv4, it should be
|
||||||
// pretty accurate due to NAT prevalence.
|
// pretty accurate due to NAT prevalence.
|
||||||
return InetAddress.getByName(str).isSiteLocalAddress();
|
InetAddress addr = InetAddress.getByName(str);
|
||||||
|
return addr.isSiteLocalAddress() || addr.isLinkLocalAddress();
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user