I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit a3c330fd authored by zzz's avatar zzz
Browse files

- Restrict <= .32 SSU-only peers from inbound tunnels,

        since they don't know if they are unreachable
parent a6f3478d
No related branches found
No related tags found
No related merge requests found
...@@ -424,6 +424,11 @@ public class ProfileOrganizer { ...@@ -424,6 +424,11 @@ public class ProfileOrganizer {
return; return;
} }
/**
* Get the peers the transport layer thinks are unreachable, and
* add in the peers with the SSU peer testing bug.
*
*/
public List selectPeersLocallyUnreachable() { public List selectPeersLocallyUnreachable() {
List n; List n;
int count; int count;
...@@ -436,6 +441,17 @@ public class ProfileOrganizer { ...@@ -436,6 +441,17 @@ public class ProfileOrganizer {
Hash peer = (Hash)iter.next(); Hash peer = (Hash)iter.next();
if (_context.commSystem().wasUnreachable(peer)) if (_context.commSystem().wasUnreachable(peer))
l.add(peer); l.add(peer);
else {
// blacklist <= 0.6.1.32 SSU-only peers, they don't know if they are unreachable,
// and we may not know either if they contacted us first, so assume they are
RouterInfo info = _context.netDb().lookupRouterInfoLocally(peer);
if (info != null) {
String v = info.getOption("router.version");
if (v != null && (!v.equals("0.6.1.33")) &&
v.startsWith("0.6.1.") && info.getTargetAddress("NTCP") == null)
l.add(peer);
}
}
} }
if (_log.shouldLog(Log.INFO)) if (_log.shouldLog(Log.INFO))
_log.info("Unreachable: " + l); _log.info("Unreachable: " + l);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment