Changeset a670100


Ignore:
Timestamp:
Oct 5, 2011 10:03:33 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
2332ac2
Parents:
979825b
Message:
  • UDP: Catch address without key sooner
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    r979825b ra670100  
     12011-10-05 zzz
     2  * Streaming: Fix build
     3  * UDP: Catch address without key sooner
     4
    152011-09-30 zzz
    26  * logs.jsp: Add wrapper version
  • router/java/src/net/i2p/router/RouterVersion.java

    r979825b ra670100  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 24;
     21    public final static long BUILD = 25;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java

    r979825b ra670100  
    183183                    deferred = _queuedOutbound.size();
    184184                } else {
     185                    // must have a valid session key
     186                    byte[] keyBytes = addr.getIntroKey();
     187                    if (keyBytes == null) {
     188                        _transport.markUnreachable(msg.getTarget().getIdentity().calculateHash());
     189                        _transport.failed(msg, "Peer has no key, cannot establish");
     190                        return;
     191                    }
     192                    SessionKey sessionKey;
     193                    try {
     194                        sessionKey = new SessionKey(keyBytes);
     195                    } catch (IllegalArgumentException iae) {
     196                        _transport.markUnreachable(msg.getTarget().getIdentity().calculateHash());
     197                        _transport.failed(msg, "Peer has bad key, cannot establish");
     198                        return;
     199                    }
    185200                    state = new OutboundEstablishState(_context, remAddr, port,
    186201                                                       msg.getTarget().getIdentity(),
    187                                                        new SessionKey(addr.getIntroKey()), addr);
     202                                                       sessionKey, addr);
    188203                    OutboundEstablishState oldState = _outboundStates.putIfAbsent(to, state);
    189204                    boolean isNew = oldState == null;
Note: See TracChangeset for help on using the changeset viewer.