Remove redundant address checks.

Remote addresses are checked for acceptability before connecting.
This commit is contained in:
akwizgran
2020-03-10 14:48:28 +00:00
parent badc6da649
commit 1495daf977

View File

@@ -270,10 +270,7 @@ class LanTcpPlugin extends TcpPlugin {
List<InetAddress> addrs = new ArrayList<>();
for (String hex : property.split(SEPARATOR)) {
byte[] ip = fromHexString(hex);
if (ip.length == 16) {
InetAddress addr = InetAddress.getByAddress(ip);
if (isIpv6LinkLocalAddress(addr)) addrs.add(addr);
}
if (ip.length == 16) addrs.add(InetAddress.getByAddress(ip));
}
return addrs;
} catch (IllegalArgumentException | UnknownHostException e) {