mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Remove redundant address checks.
Remote addresses are checked for acceptability before connecting.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user