diff --git a/apps/routerconsole/jsp/themes/console/images/notblob.png b/apps/routerconsole/jsp/themes/console/images/notblob.png index 547a7bea7..7c7c8dff6 100644 Binary files a/apps/routerconsole/jsp/themes/console/images/notblob.png and b/apps/routerconsole/jsp/themes/console/images/notblob.png differ diff --git a/apps/routerconsole/jsp/themes/console/images/ramble.png b/apps/routerconsole/jsp/themes/console/images/ramble.png index d1d5f2bae..5fb0be3e7 100644 Binary files a/apps/routerconsole/jsp/themes/console/images/ramble.png and b/apps/routerconsole/jsp/themes/console/images/ramble.png differ diff --git a/router/java/src/net/i2p/router/networkdb/HandleDatabaseLookupMessageJob.java b/router/java/src/net/i2p/router/networkdb/HandleDatabaseLookupMessageJob.java index d072604b9..d6fc7c49c 100644 --- a/router/java/src/net/i2p/router/networkdb/HandleDatabaseLookupMessageJob.java +++ b/router/java/src/net/i2p/router/networkdb/HandleDatabaseLookupMessageJob.java @@ -163,10 +163,7 @@ public class HandleDatabaseLookupMessageJob extends JobImpl { getContext().statManager().addRateData("netDb.lookupsMatchedLocalClosest", 1); sendData(searchKey, ls, fromKey, toTunnel); } else if (possibleMultihomed != null) { - if (possibleMultihomed.isCurrent(Router.CLOCK_FUDGE_FACTOR / 4)) { - // If it's in the possibleMultihomed cache, then it was definitely stored to us meaning it is effectively - // always recievedAsPublished. No need to decide whether or not to answer the request like above, just - // answer it so it doesn't look different from other stores. + if (possibleMultihomed.isCurrent(Router.CLOCK_FUDGE_FACTOR / 4) && possibleMultihomed.getReceivedAsPublished()) { if (_log.shouldLog(Log.INFO)) _log.info("We have local LS, possibly from a multihomed router " + searchKey + ", and somebody requested it back from us. Answering query, as if in our keyspace, to avoid attack."); getContext().statManager().addRateData("netDb.lookupsMatchedLocalMultihome", 1); @@ -192,10 +189,7 @@ public class HandleDatabaseLookupMessageJob extends JobImpl { } else { LeaseSet possibleMultihomed = getContext().clientMessagePool().getCache().multihomedCache.get(searchKey); if (possibleMultihomed != null) { - if (possibleMultihomed.isCurrent(Router.CLOCK_FUDGE_FACTOR / 4)) { - // If it's in the possibleMultihomed cache, then it was definitely stored to us meaning it is effectively - // always recievedAsPublished. No need to decide whether or not to answer the request like above, just - // answer it so it doesn't look different from other stores. + if (possibleMultihomed.isCurrent(Router.CLOCK_FUDGE_FACTOR / 4) && possibleMultihomed.getReceivedAsPublished()) { if (_log.shouldLog(Log.INFO)) _log.info("We have local LS, possibly from a multihomed router " + searchKey + ", and somebody requested it back from us. Answering query, as if in our keyspace, to avoid attack."); getContext().statManager().addRateData("netDb.lookupsMatchedLocalMultihome", 1); diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/HandleFloodfillDatabaseStoreMessageJob.java b/router/java/src/net/i2p/router/networkdb/kademlia/HandleFloodfillDatabaseStoreMessageJob.java index c28fa376f..3a299be09 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/HandleFloodfillDatabaseStoreMessageJob.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/HandleFloodfillDatabaseStoreMessageJob.java @@ -92,6 +92,16 @@ class HandleFloodfillDatabaseStoreMessageJob extends JobImpl { // This could happen with multihoming - where it's really important to prevent // storing the other guy's leaseset, it will confuse us badly. LeaseSet ls = (LeaseSet) entry; + // If this was received as a response to a query, + // FloodOnlyLookupMatchJob called setReceivedAsReply(), + // and we are seeing this only as a duplicate, + // so we don't set the receivedAsPublished() flag. + // Otherwise, mark it as something we received unsolicited, so we'll answer queries + // for it. This flag must NOT get set on entries that we + // receive in response to our own lookups. + // See ../HDLMJ for more info + if (!ls.getReceivedAsReply()) + ls.setReceivedAsPublished(); if (getContext().clientManager().isLocal(key)) { getContext().statManager().addRateData("netDb.storeLocalLeaseSetAttempt", 1, 0); // throw rather than return, so that we send the ack below (prevent easy attack) @@ -111,16 +121,7 @@ class HandleFloodfillDatabaseStoreMessageJob extends JobImpl { } //boolean oldrar = ls.getReceivedAsReply(); //boolean oldrap = ls.getReceivedAsPublished(); - // If this was received as a response to a query, - // FloodOnlyLookupMatchJob called setReceivedAsReply(), - // and we are seeing this only as a duplicate, - // so we don't set the receivedAsPublished() flag. - // Otherwise, mark it as something we received unsolicited, so we'll answer queries - // for it. This flag must NOT get set on entries that we - // receive in response to our own lookups. - // See ../HDLMJ for more info - if (!ls.getReceivedAsReply()) - ls.setReceivedAsPublished(); + //boolean rap = ls.getReceivedAsPublished(); //if (_log.shouldLog(Log.INFO)) // _log.info("oldrap? " + oldrap + " oldrar? " + oldrar + " newrap? " + rap);