Changeset 0b48b18


Ignore:
Timestamp:
Nov 19, 2004 11:04:27 PM (16 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
21506c1d
Parents:
c8f6d9c
git-author:
jrandom <jrandom> (11/19/04 23:04:27)
git-committer:
zzz <zzz@…> (11/19/04 23:04:27)
Message:

2004-11-19 jrandom

  • Off-by-one fix to the tunnel pool management code, along side some explicit initialization. This can affect clients whose lengths are shorter than the router's default (thanks duck!)
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    rc8f6d9c r0b48b18  
    1 $Id: history.txt,v 1.74 2004/11/17 13:34:25 jrandom Exp $
     1$Id: history.txt,v 1.75 2004/11/17 14:42:53 jrandom Exp $
     2
     32004-11-19  jrandom
     4    * Off-by-one fix to the tunnel pool management code, along side some
     5      explicit initialization.  This can affect clients whose lengths are
     6      shorter than the router's default (thanks duck!)
    27
    382004-11-17  jrandom
  • router/java/src/net/i2p/router/ClientTunnelSettings.java

    rc8f6d9c r0b48b18  
    6969   
    7070    public ClientTunnelSettings() {
    71         _numInbound = 0;
    72         _numOutbound = 0;
    73         _depthInbound = 0;
    74         _depthOutbound = 0;
    75         _msgsPerMinuteAvgInbound = 0;
    76         _bytesPerMinuteAvgInbound = 0;
    77         _msgsPerMinutePeakInbound = 0;
    78         _bytesPerMinutePeakInbound = 0;
    79         _includeDummyInbound = false;
    80         _includeDummyOutbound = false;
    81         _reorderInbound = false;
    82         _reorderOutbound = false;
    83         _inboundDuration = -1;
    84         _enforceStrictMinimumLength = false;
     71        _numInbound = DEFAULT_NUM_INBOUND;
     72        _numOutbound = DEFAULT_NUM_OUTBOUND;
     73        _depthInbound = DEFAULT_DEPTH_INBOUND;
     74        _depthOutbound = DEFAULT_DEPTH_OUTBOUND;
     75        _msgsPerMinuteAvgInbound = DEFAULT_MSGS_AVG;
     76        _bytesPerMinuteAvgInbound = DEFAULT_BYTES_AVG;
     77        _msgsPerMinutePeakInbound = DEFAULT_MSGS_PEAK;
     78        _bytesPerMinutePeakInbound = DEFAULT_BYTES_PEAK;
     79        _includeDummyInbound = DEFAULT_DUMMY_INBOUND;
     80        _includeDummyOutbound = DEFAULT_DUMMY_OUTBOUND;
     81        _reorderInbound = DEFAULT_REORDER_INBOUND;
     82        _reorderOutbound = DEFAULT_REORDER_OUTBOUND;
     83        _inboundDuration = DEFAULT_DURATION;
     84        _enforceStrictMinimumLength = DEFAULT_STRICT_MINIMUM_LENGTH;
    8585    }
    8686       
  • router/java/src/net/i2p/router/RouterVersion.java

    rc8f6d9c r0b48b18  
    1616 */
    1717public class RouterVersion {
    18     public final static String ID = "$Revision: 1.79 $ $Date: 2004/11/17 13:34:26 $";
     18    public final static String ID = "$Revision: 1.80 $ $Date: 2004/11/17 14:42:53 $";
    1919    public final static String VERSION = "0.4.1.4";
    20     public final static long BUILD = 8;
     20    public final static long BUILD = 9;
    2121    public static void main(String args[]) {
    2222        System.out.println("I2P Router version: " + VERSION);
  • router/java/src/net/i2p/router/tunnelmanager/ClientTunnelPoolManagerJob.java

    rc8f6d9c r0b48b18  
    187187        }
    188188
    189         int length = info.getLength();
     189        int length = info.getLength() - 1; // -1 because .getLength() includes us
    190190        if (_clientPool.getClientSettings().getEnforceStrictMinimumLength()) {
    191191            if (length < _clientPool.getClientSettings().getDepthInbound()) {
    192192                // we will require at least the client's length, but they dont meet it
    193193                if (_log.shouldLog(Log.DEBUG))
    194                     _log.debug("Refusing tunnel " + info.getTunnelId()
     194                    _log.debug("Strictly refusing tunnel " + info.getTunnelId()
    195195                               + " because it is too short (length = " + length
    196196                               + ", wanted = " + _clientPool.getClientSettings().getDepthInbound()
     
    206206                // this tunnel however meets neither criteria
    207207                if (_log.shouldLog(Log.DEBUG))
    208                     _log.debug("Refusing tunnel " + info.getTunnelId()
     208                    _log.debug("Loosely refusing tunnel " + info.getTunnelId()
    209209                               + " because it is too short (length = " + length
    210210                               + ", wanted = " + _clientPool.getClientSettings().getDepthInbound()
     
    231231
    232232        if (_log.shouldLog(Log.DEBUG))
    233             _log.debug("Accepting tunnel " + info.getTunnelId());
     233            _log.debug("Accepting tunnel for length=" + _clientPool.getClientSettings().getDepthInbound() +
     234                       " and dest=" + _clientPool.getDestination().calculateHash().toBase64().substring(0,6)
     235                       + " for " + info.getTunnelId());
    234236        return true;
    235237    }
Note: See TracChangeset for help on using the changeset viewer.