forked from I2P_Developers/i2p.i2p
Router: Change quick address check for introducers
from ihost0 to itag0, because SSU2 probably won't use ihost
This commit is contained in:
@@ -229,7 +229,7 @@ class FloodfillMonitorJob extends JobImpl {
|
||||
if (ra == null)
|
||||
happy = false;
|
||||
else {
|
||||
if (ra.getOption("ihost0") != null)
|
||||
if (ra.getOption("itag0") != null)
|
||||
happy = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1206,7 +1206,7 @@ public abstract class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacad
|
||||
// Just check all the addresses, faster than getting just the SSU ones
|
||||
for (RouterAddress ra : routerInfo.getAddresses()) {
|
||||
// Introducers change often, introducee will ping introducer for 2 hours
|
||||
if (ra.getOption("ihost0") != null)
|
||||
if (ra.getOption("itag0") != null)
|
||||
return "Old peer with SSU Introducers";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public class ReseedBundler {
|
||||
boolean hasIPv4 = false;
|
||||
boolean dupIP = false;
|
||||
for (RouterAddress addr : addrs) {
|
||||
if ("SSU".equals(addr.getTransportStyle()) && addr.getOption("ihost0") != null) {
|
||||
if ("SSU".equals(addr.getTransportStyle()) && addr.getOption("itag0") != null) {
|
||||
hasIntro = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -815,7 +815,7 @@ public class ProfileOrganizer {
|
||||
continue;
|
||||
}
|
||||
// This is the quick way of doing UDPAddress.getIntroducerCount() > 0
|
||||
if (ra.getOption("ihost0") != null)
|
||||
if (ra.getOption("itag0") != null)
|
||||
l.add(peer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
||||
// Don't pass IP along if address has introducers
|
||||
// Right now we publish the direct UDP address, even if publishing introducers,
|
||||
// we probably shouldn't, see UDPTransport rebuildExternalAddress() TODO
|
||||
if (udpAddr != null && udpAddr.getOption("ihost0") == null) {
|
||||
if (udpAddr != null && udpAddr.getOption("itag0") == null) {
|
||||
ip = udpAddr.getIP();
|
||||
port = udpAddr.getPort();
|
||||
}
|
||||
|
||||
@@ -2069,7 +2069,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
boolean rv = (externalListenHost == null) || (externalListenPort <= 0);
|
||||
if (!rv) {
|
||||
// shortcut to determine if introducers are present
|
||||
if (addr.getOption("ihost0") != null)
|
||||
if (addr.getOption("itag0") != null)
|
||||
rv = true; // status == ok and we don't actually need introducers, so rebuild
|
||||
}
|
||||
if (rv) {
|
||||
@@ -2325,7 +2325,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
RouterAddress addr = addrs.get(i);
|
||||
//if (getSSUVersion(addr) == 0)
|
||||
// continue;
|
||||
if (addr.getOption("ihost0") == null) {
|
||||
if (addr.getOption("itag0") == null) {
|
||||
// No introducers
|
||||
// Skip outbound-only or invalid address/port
|
||||
byte[] ip = addr.getIP();
|
||||
|
||||
Reference in New Issue
Block a user