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;
|
continue;
|
||||||
}
|
}
|
||||||
boolean hasIntro = false;
|
boolean hasIntro = false;
|
||||||
|
boolean hasIPv4 = false;
|
||||||
for (RouterAddress addr : addrs) {
|
for (RouterAddress addr : addrs) {
|
||||||
if ("SSU".equals(addr.getTransportStyle()) && addr.getOption("ihost0") != null) {
|
if ("SSU".equals(addr.getTransportStyle()) && addr.getOption("ihost0") != null) {
|
||||||
hasIntro = true;
|
hasIntro = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
String host = addr.getHost();
|
||||||
|
if (host != null && host.contains("."))
|
||||||
|
hasIPv4 = true;
|
||||||
}
|
}
|
||||||
if (hasIntro) {
|
if (hasIntro) {
|
||||||
System.out.println("Skipping introduced " + key);
|
System.out.println("Skipping introduced " + key);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!hasIPv4) {
|
||||||
|
System.out.println("Skipping IPv6-only " + key);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
File toFile = new File(toDir, file.getName());
|
File toFile = new File(toDir, file.getName());
|
||||||
// We could call ri.write() to avoid simultaneous change by the router
|
// We could call ri.write() to avoid simultaneous change by the router
|
||||||
boolean ok = FileUtil.copy(file, toFile, true, true);
|
boolean ok = FileUtil.copy(file, toFile, true, true);
|
||||||
|
Reference in New Issue
Block a user