forked from I2P_Developers/i2p.i2p
dont bundle IPv6-only RIs
This commit is contained in:
@@ -787,16 +787,24 @@ class PersistentDataStore extends TransientDataStore {
|
||||
continue;
|
||||
}
|
||||
boolean hasIntro = false;
|
||||
boolean hasIPv4 = false;
|
||||
for (RouterAddress addr : addrs) {
|
||||
if ("SSU".equals(addr.getTransportStyle()) && addr.getOption("ihost0") != null) {
|
||||
hasIntro = true;
|
||||
break;
|
||||
}
|
||||
String host = addr.getHost();
|
||||
if (host != null && host.contains("."))
|
||||
hasIPv4 = true;
|
||||
}
|
||||
if (hasIntro) {
|
||||
System.out.println("Skipping introduced " + key);
|
||||
continue;
|
||||
}
|
||||
if (!hasIPv4) {
|
||||
System.out.println("Skipping IPv6-only " + key);
|
||||
continue;
|
||||
}
|
||||
File toFile = new File(toDir, file.getName());
|
||||
// We could call ri.write() to avoid simultaneous change by the router
|
||||
boolean ok = FileUtil.copy(file, toFile, true, true);
|
||||
|
Reference in New Issue
Block a user