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

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

Router: Min version for tunnel peers

parent 3d565452
No related branches found
No related tags found
No related merge requests found
2020-05-07 zzz
* Router:
- Fix INMP NPE on non-default config (ticket #2688)
- Min version for tunnel peers
2020-05-06 zzz
* Streaming: Reduce default ack delay (ticket #2706)
2020-05-05 zzz
* Build: Use --java2 for msgfmt
* i2ptunnel:
......@@ -21,7 +29,7 @@
 
2020-05-01 idk
* i2ptunnel: Collapse/Expand UI elements for advanced features, organize
advanced features by category. Replace nested tables.
advanced features by category. Replace nested tables.
* SusiMail: Fix missing icon from dark theme (ticket #2726)
 
2020-04-30 zzz
......
......@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 16;
public final static long BUILD = 17;
/** for example "-test" */
public final static String EXTRA = "";
......
......@@ -416,15 +416,15 @@ public abstract class TunnelPeerSelector extends ConnectChecker {
if (known != null) {
for (int i = 0; i < known.size(); i++) {
RouterInfo peer = known.get(i);
// we can skip this check now, uncomment if we have some breaking change
Hash h = peer.getIdentity().calculateHash();
// Uncomment if stricter than in shouldExclude() below
//String v = peer.getVersion();
// RI sigtypes added in 0.9.16
// SSU inbound connection bug fixed in 0.9.17, but it won't bid, so NTCP only,
// no need to check
//if (VersionComparator.comp(v, "0.9.16") < 0)
// rv.add(peer.getIdentity().calculateHash());
//if (VersionComparator.comp(v, "0.9.16") < 0) {
// rv.add(h);
// continue;
//}
Hash h = peer.getIdentity().calculateHash();
if (connected.contains(h))
continue;
boolean canConnect = isInbound ? canConnect(peer, ourMask) : canConnect(ourMask, peer);
......@@ -451,9 +451,10 @@ public abstract class TunnelPeerSelector extends ConnectChecker {
}
}
/** 0.7.8 and earlier had major message corruption bugs */
//private static final String MIN_VERSION = "0.7.9";
/** NTCP2 */
private static final String MIN_VERSION = "0.9.36";
/** warning, this is also called by ProfileOrganizer.isSelectable() */
private static boolean shouldExclude(RouterInfo peer, char excl[]) {
String cap = peer.getCapabilities();
for (int j = 0; j < excl.length; j++) {
......@@ -477,10 +478,9 @@ public abstract class TunnelPeerSelector extends ConnectChecker {
// so don't exclude it based on published capacity
// minimum version check
// we can skip this check now
//String v = peer.getVersion();
//if (VersionComparator.comp(v, MIN_VERSION) < 0)
// return true;
String v = peer.getVersion();
if (VersionComparator.comp(v, MIN_VERSION) < 0)
return true;
// uptime is always spoofed to 90m, so just remove all this
/******
......
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