mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 13:49:53 +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<>();
|
List<InetAddress> addrs = new ArrayList<>();
|
||||||
for (String hex : property.split(SEPARATOR)) {
|
for (String hex : property.split(SEPARATOR)) {
|
||||||
byte[] ip = fromHexString(hex);
|
byte[] ip = fromHexString(hex);
|
||||||
if (ip.length == 16) {
|
if (ip.length == 16) addrs.add(InetAddress.getByAddress(ip));
|
||||||
InetAddress addr = InetAddress.getByAddress(ip);
|
|
||||||
if (isIpv6LinkLocalAddress(addr)) addrs.add(addr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return addrs;
|
return addrs;
|
||||||
} catch (IllegalArgumentException | UnknownHostException e) {
|
} catch (IllegalArgumentException | UnknownHostException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user