Changeset 8c6922a


Ignore:
Timestamp:
Jan 12, 2014 3:24:13 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8bbab31
Parents:
6b67f399
Message:
  • NetDB: Fix handling of DSRM down client tunnels

ISJ log tweak

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    r6b67f399 r8c6922a  
     12014-01-12 zzz
     2 * NetDB: Fix handling of DSRM down client tunnels
     3
    142014-01-11 zzz
    25 * NetDB:
  • router/java/src/net/i2p/router/RouterVersion.java

    r6b67f399 r8c6922a  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 8;
     21    public final static long BUILD = 9;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/networkdb/kademlia/IterativeSearchJob.java

    r6b67f399 r8c6922a  
    293293                    tries = _unheardFrom.size() + _failedPeers.size();
    294294                }
    295                 _log.info(getJobId() + ": ISJ try " + tries + " for " + _key + " to " + peer +
     295                _log.info(getJobId() + ": ISJ try " + tries + " for " +
     296                          (_isLease ? "LS " : "RI ") +
     297                          _key + " to " + peer +
    296298                          " reply via client tunnel? " + isClientReplyTunnel);
    297299            }
  • router/java/src/net/i2p/router/tunnel/InboundMessageDistributor.java

    r6b67f399 r8c6922a  
    5959       
    6060        int type = msg.getType();
    61         // FVSJ could also result in a DSRM.
     61        // FVSJ or client lookups could also result in a DSRM.
    6262        // Since there's some code that replies directly to this to gather new ff RouterInfos,
    6363        // sanitize it
    6464        if ( (_client != null) &&
    65              (type == DatabaseSearchReplyMessage.MESSAGE_TYPE) &&
    66              (_client.equals(((DatabaseSearchReplyMessage)msg).getSearchKey()))) {
     65             (type == DatabaseSearchReplyMessage.MESSAGE_TYPE)) {
     66            // TODO: Strip in IterativeLookupJob etc. instead, depending on
     67            // LS or RI and client or expl., so that we can safely follow references
     68            // in a reply to a LS lookup over client tunnels.
     69            // ILJ would also have to follow references via client tunnels
    6770            DatabaseSearchReplyMessage orig = (DatabaseSearchReplyMessage) msg;
    6871            if (orig.getNumReplies() > 0) {
    69                 if (_log.shouldLog(Log.WARN))
    70                     _log.warn("Removing replies from a DSRM down a tunnel for " + _client + ": " + msg);
     72                if (_log.shouldLog(Log.INFO))
     73                    _log.info("Removing replies from a DSRM down a tunnel for " + _client + ": " + msg);
    7174                DatabaseSearchReplyMessage newMsg = new DatabaseSearchReplyMessage(_context);
    7275                newMsg.setFromHash(orig.getFromHash());
     
    214217                                _context.inNetMessagePool().add(dsm, null, null);
    215218                            }
    216                 } else if (_client != null && type == DatabaseSearchReplyMessage.MESSAGE_TYPE &&
    217                            _client.equals(((DatabaseSearchReplyMessage) data).getSearchKey())) {
     219                } else if (_client != null && type == DatabaseSearchReplyMessage.MESSAGE_TYPE) {
    218220                    // DSRMs show up here now that replies are encrypted
     221                    // TODO: Strip in IterativeLookupJob etc. instead, depending on
     222                    // LS or RI and client or expl., so that we can safely follow references
     223                    // in a reply to a LS lookup over client tunnels.
     224                    // ILJ would also have to follow references via client tunnels
    219225                    DatabaseSearchReplyMessage orig = (DatabaseSearchReplyMessage) data;
    220226                    if (orig.getNumReplies() > 0) {
    221                         if (_log.shouldLog(Log.WARN))
    222                             _log.warn("Removing replies from a garlic DSRM down a tunnel for " + _client + ": " + data);
     227                        if (_log.shouldLog(Log.INFO))
     228                            _log.info("Removing replies from a garlic DSRM down a tunnel for " + _client + ": " + data);
    223229                        DatabaseSearchReplyMessage newMsg = new DatabaseSearchReplyMessage(_context);
    224230                        newMsg.setFromHash(orig.getFromHash());
Note: See TracChangeset for help on using the changeset viewer.