mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-20 23:36:53 +00:00
Also count link-local addresses as local
This commit is contained in:
1 parent
d833933aaa
commit
cd06559c66
1 file changed
+2
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user