forked from I2P_Developers/i2p.i2p
* UDP: Catch address without key sooner
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2011-10-05 zzz
|
||||
* Streaming: Fix build
|
||||
* UDP: Catch address without key sooner
|
||||
|
||||
2011-09-30 zzz
|
||||
* logs.jsp: Add wrapper version
|
||||
* Shitlist: Shorten time
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 24;
|
||||
public final static long BUILD = 25;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "-rc";
|
||||
|
@ -182,9 +182,24 @@ class EstablishmentManager {
|
||||
}
|
||||
deferred = _queuedOutbound.size();
|
||||
} else {
|
||||
// must have a valid session key
|
||||
byte[] keyBytes = addr.getIntroKey();
|
||||
if (keyBytes == null) {
|
||||
_transport.markUnreachable(msg.getTarget().getIdentity().calculateHash());
|
||||
_transport.failed(msg, "Peer has no key, cannot establish");
|
||||
return;
|
||||
}
|
||||
SessionKey sessionKey;
|
||||
try {
|
||||
sessionKey = new SessionKey(keyBytes);
|
||||
} catch (IllegalArgumentException iae) {
|
||||
_transport.markUnreachable(msg.getTarget().getIdentity().calculateHash());
|
||||
_transport.failed(msg, "Peer has bad key, cannot establish");
|
||||
return;
|
||||
}
|
||||
state = new OutboundEstablishState(_context, remAddr, port,
|
||||
msg.getTarget().getIdentity(),
|
||||
new SessionKey(addr.getIntroKey()), addr);
|
||||
sessionKey, addr);
|
||||
OutboundEstablishState oldState = _outboundStates.putIfAbsent(to, state);
|
||||
boolean isNew = oldState == null;
|
||||
if (!isNew)
|
||||
|
Reference in New Issue
Block a user