diff --git a/history.txt b/history.txt index 32687e266..75f2c5937 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,14 @@ +2008-04-20 zzz + * Outbound message/Reachability: + - Fix a bug from -19 causing the persistent lease selection + removed in -17 to be back again + - Use netDb-listed-unreachable instead of detected-unreachable + for exclusion of unreachable peers from selected leases, + as there are potential anonymity problems with using + detected-unreachable + - Tweak logging some more + * NetDb stats: Remove a couple more including the inefficient stat_identities + 2008-04-17 zzz * Reachability: - Track unreachable peers persistently diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index d7909dfd6..63c055af0 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -17,7 +17,7 @@ import net.i2p.CoreVersion; public class RouterVersion { public final static String ID = "$Revision: 1.548 $ $Date: 2008-02-10 15:00:00 $"; public final static String VERSION = "0.6.1.32"; - public final static long BUILD = 19; + public final static long BUILD = 20; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("Router ID: " + RouterVersion.ID); diff --git a/router/java/src/net/i2p/router/StatisticsManager.java b/router/java/src/net/i2p/router/StatisticsManager.java index 867c22022..f91eda3e8 100644 --- a/router/java/src/net/i2p/router/StatisticsManager.java +++ b/router/java/src/net/i2p/router/StatisticsManager.java @@ -103,6 +103,7 @@ public class StatisticsManager implements Service { // stats.setProperty("router.id", RouterVersion.ID); // stats.setProperty("core.id", CoreVersion.ID); +/*** int newlines = 0; FileInputStream in = null; try { @@ -122,7 +123,7 @@ public class StatisticsManager implements Service { } if (newlines > 0) stats.setProperty("stat_identities", newlines+""); - +***/ if (_includePeerRankings) { if (false) @@ -150,6 +151,7 @@ public class StatisticsManager implements Service { //includeRate("router.throttleTunnelProbTooFast", stats, new long[] { 60*60*1000 }); //includeRate("router.throttleTunnelProcessingTime1m", stats, new long[] { 60*60*1000 }); + if (commentMeOutInDot33) includeRate("router.fastPeers", stats, new long[] { 60*60*1000 }); //includeRate("udp.statusOK", stats, new long[] { 20*60*1000 }); diff --git a/router/java/src/net/i2p/router/message/OutboundClientMessageOneShotJob.java b/router/java/src/net/i2p/router/message/OutboundClientMessageOneShotJob.java index d9357b563..692fc575e 100644 --- a/router/java/src/net/i2p/router/message/OutboundClientMessageOneShotJob.java +++ b/router/java/src/net/i2p/router/message/OutboundClientMessageOneShotJob.java @@ -16,6 +16,7 @@ import net.i2p.data.Hash; import net.i2p.data.Lease; import net.i2p.data.LeaseSet; import net.i2p.data.PublicKey; +import net.i2p.data.RouterInfo; import net.i2p.data.SessionKey; import net.i2p.data.Payload; import net.i2p.data.i2cp.MessageId; @@ -320,20 +321,29 @@ public class OutboundClientMessageOneShotJob extends JobImpl { } else { ****/ + // Avoid a lease on a gateway we think is unreachable, if possible - for (int i = 0; i < _leaseSet.getLeaseCount(); i++) { - Lease l = _leaseSet.getLease(i); + for (int i = 0; i < leases.size(); i++) { + Lease l = (Lease) leases.get(i); +/*** + *** Anonymity concerns with this, as the dest could act unreachable just to us, then + *** look at our lease selection. + *** Let's just look at whether the gw thinks it is unreachable instead - + *** unfortunately the "U" is rarely seen. if (!getContext().commSystem().wasUnreachable(l.getGateway())) { +***/ + RouterInfo ri = getContext().netDb().lookupRouterInfoLocally(l.getGateway()); + if (ri == null || ri.getCapabilities().indexOf(Router.CAPABILITY_UNREACHABLE) < 0) { _lease = l; break; } if (_log.shouldLog(Log.WARN)) - _log.warn(getJobId() + ": Skipping unreachable (by us) gateway " + l.getGateway()); + _log.warn(getJobId() + ": Skipping unreachable gateway " + l.getGateway() + " for " + _toString); } if (_lease == null) { _lease = (Lease)leases.get(0); if (_log.shouldLog(Log.WARN)) - _log.warn(getJobId() + ": All leases are unreachable (by us) for " + _toString); + _log.warn(getJobId() + ": All leases are unreachable for " + _toString); } /*** removed until we fix SSU reachability synchronized (_leaseCache) {