forked from I2P_Developers/i2p.i2p
* NetDB: Fix handling of DSRM down client tunnels
ISJ log tweak
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
2014-01-12 zzz
|
||||||
|
* NetDB: Fix handling of DSRM down client tunnels
|
||||||
|
|
||||||
2014-01-11 zzz
|
2014-01-11 zzz
|
||||||
* NetDB:
|
* NetDB:
|
||||||
- Reduce min part tunnels for ffs to 35
|
- Reduce min part tunnels for ffs to 35
|
||||||
|
@@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 8;
|
public final static long BUILD = 9;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "";
|
||||||
|
@@ -292,7 +292,9 @@ class IterativeSearchJob extends FloodSearchJob {
|
|||||||
synchronized(this) {
|
synchronized(this) {
|
||||||
tries = _unheardFrom.size() + _failedPeers.size();
|
tries = _unheardFrom.size() + _failedPeers.size();
|
||||||
}
|
}
|
||||||
_log.info(getJobId() + ": ISJ try " + tries + " for " + _key + " to " + peer +
|
_log.info(getJobId() + ": ISJ try " + tries + " for " +
|
||||||
|
(_isLease ? "LS " : "RI ") +
|
||||||
|
_key + " to " + peer +
|
||||||
" reply via client tunnel? " + isClientReplyTunnel);
|
" reply via client tunnel? " + isClientReplyTunnel);
|
||||||
}
|
}
|
||||||
long now = getContext().clock().now();
|
long now = getContext().clock().now();
|
||||||
|
@@ -58,16 +58,19 @@ class InboundMessageDistributor implements GarlicMessageReceiver.CloveReceiver {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int type = msg.getType();
|
int type = msg.getType();
|
||||||
// FVSJ could also result in a DSRM.
|
// FVSJ or client lookups could also result in a DSRM.
|
||||||
// Since there's some code that replies directly to this to gather new ff RouterInfos,
|
// Since there's some code that replies directly to this to gather new ff RouterInfos,
|
||||||
// sanitize it
|
// sanitize it
|
||||||
if ( (_client != null) &&
|
if ( (_client != null) &&
|
||||||
(type == DatabaseSearchReplyMessage.MESSAGE_TYPE) &&
|
(type == DatabaseSearchReplyMessage.MESSAGE_TYPE)) {
|
||||||
(_client.equals(((DatabaseSearchReplyMessage)msg).getSearchKey()))) {
|
// TODO: Strip in IterativeLookupJob etc. instead, depending on
|
||||||
|
// LS or RI and client or expl., so that we can safely follow references
|
||||||
|
// in a reply to a LS lookup over client tunnels.
|
||||||
|
// ILJ would also have to follow references via client tunnels
|
||||||
DatabaseSearchReplyMessage orig = (DatabaseSearchReplyMessage) msg;
|
DatabaseSearchReplyMessage orig = (DatabaseSearchReplyMessage) msg;
|
||||||
if (orig.getNumReplies() > 0) {
|
if (orig.getNumReplies() > 0) {
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.INFO))
|
||||||
_log.warn("Removing replies from a DSRM down a tunnel for " + _client + ": " + msg);
|
_log.info("Removing replies from a DSRM down a tunnel for " + _client + ": " + msg);
|
||||||
DatabaseSearchReplyMessage newMsg = new DatabaseSearchReplyMessage(_context);
|
DatabaseSearchReplyMessage newMsg = new DatabaseSearchReplyMessage(_context);
|
||||||
newMsg.setFromHash(orig.getFromHash());
|
newMsg.setFromHash(orig.getFromHash());
|
||||||
newMsg.setSearchKey(orig.getSearchKey());
|
newMsg.setSearchKey(orig.getSearchKey());
|
||||||
@@ -213,13 +216,16 @@ class InboundMessageDistributor implements GarlicMessageReceiver.CloveReceiver {
|
|||||||
_log.info("Storing garlic RI down tunnel for: " + dsm.getKey() + " sent to: " + _client);
|
_log.info("Storing garlic RI down tunnel for: " + dsm.getKey() + " sent to: " + _client);
|
||||||
_context.inNetMessagePool().add(dsm, null, null);
|
_context.inNetMessagePool().add(dsm, null, null);
|
||||||
}
|
}
|
||||||
} else if (_client != null && type == DatabaseSearchReplyMessage.MESSAGE_TYPE &&
|
} else if (_client != null && type == DatabaseSearchReplyMessage.MESSAGE_TYPE) {
|
||||||
_client.equals(((DatabaseSearchReplyMessage) data).getSearchKey())) {
|
|
||||||
// DSRMs show up here now that replies are encrypted
|
// DSRMs show up here now that replies are encrypted
|
||||||
|
// TODO: Strip in IterativeLookupJob etc. instead, depending on
|
||||||
|
// LS or RI and client or expl., so that we can safely follow references
|
||||||
|
// in a reply to a LS lookup over client tunnels.
|
||||||
|
// ILJ would also have to follow references via client tunnels
|
||||||
DatabaseSearchReplyMessage orig = (DatabaseSearchReplyMessage) data;
|
DatabaseSearchReplyMessage orig = (DatabaseSearchReplyMessage) data;
|
||||||
if (orig.getNumReplies() > 0) {
|
if (orig.getNumReplies() > 0) {
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.INFO))
|
||||||
_log.warn("Removing replies from a garlic DSRM down a tunnel for " + _client + ": " + data);
|
_log.info("Removing replies from a garlic DSRM down a tunnel for " + _client + ": " + data);
|
||||||
DatabaseSearchReplyMessage newMsg = new DatabaseSearchReplyMessage(_context);
|
DatabaseSearchReplyMessage newMsg = new DatabaseSearchReplyMessage(_context);
|
||||||
newMsg.setFromHash(orig.getFromHash());
|
newMsg.setFromHash(orig.getFromHash());
|
||||||
newMsg.setSearchKey(orig.getSearchKey());
|
newMsg.setSearchKey(orig.getSearchKey());
|
||||||
|
Reference in New Issue
Block a user