SSU2: Log tweaks

This commit is contained in:
zzz
2022-03-17 16:45:16 -04:00
parent 70b7d1204b
commit d9c629a6b1
2 changed files with 6 additions and 2 deletions

View File

@@ -140,6 +140,8 @@ class OutboundEstablishState2 extends OutboundEstablishState implements SSU2Payl
_sendHeaderEncryptKey2 = ik;
//_rcvHeaderEncryptKey2 will be set after the Session Request message is created
_rcvRetryHeaderEncryptKey2 = ik;
if (_log.shouldDebug())
_log.debug("New " + this);
}
private void createNewState(RouterAddress addr) {
@@ -366,6 +368,8 @@ class OutboundEstablishState2 extends OutboundEstablishState implements SSU2Payl
if (_skew > MAX_SKEW || _skew < 0 - MAX_SKEW)
throw new GeneralSecurityException("Skew exceeded in Session/Token Request: " + _skew);
createNewState(_routerAddress);
if (_log.shouldDebug())
_log.debug("Received a retry on " + this);
_currentState = OutboundState.OB_STATE_RETRY_RECEIVED;
}

View File

@@ -848,7 +848,7 @@ class PacketHandler {
header.getVersion() != 2 ||
header.getNetID() != _networkID) {
if (_log.shouldWarn())
_log.warn("Failed decrypt Session Request after Retry: " + header);
_log.warn("Failed decrypt Session Request after Retry: " + header + " on " + state);
return false;
}
if (header.getSrcConnID() != state.getSendConnID()) {
@@ -970,7 +970,7 @@ class PacketHandler {
header.getVersion() != 2 ||
header.getNetID() != _networkID) {
if (_log.shouldWarn())
_log.warn("Does not decrypt as Session Created or Retry: " + header);
_log.warn("Does not decrypt as Session Created or Retry: " + header + " on " + state);
return false;
}
type = SSU2Util.RETRY_FLAG_BYTE;