Skip to content

Commit

Permalink
add peer test session endpoint to connected recently after msg 6 and 7
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Sep 25, 2024
1 parent 262a803 commit 6776324
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libi2pd/SSU2Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3064,6 +3064,7 @@ namespace transport
SetSourceConnID (sourceConnID);
SetDestConnID (destConnID);
SetState (eSSU2SessionStatePeerTest);
SetTerminationTimeout (SSU2_PEER_TEST_EXPIRATION_TIMEOUT);
}

bool SSU2PeerTestSession::ProcessPeerTest (uint8_t * buf, size_t len)
Expand Down Expand Up @@ -3140,6 +3141,7 @@ namespace transport
SendPeerTest (7, buf + offset, len - offset);
else
LogPrint (eLogWarning, "SSU2: Unknown address for peer test 6");
GetServer ().AddConnectedRecently (GetRemoteEndpoint (), i2p::util::GetSecondsSinceEpoch ());
GetServer ().RequestRemoveSession (GetConnID ());
break;
}
Expand All @@ -3148,6 +3150,7 @@ namespace transport
auto addr = GetAddress ();
if (addr && addr->IsV6 ())
i2p::context.SetStatusV6 (eRouterStatusOK); // set status OK for ipv6 even if from SSU2
GetServer ().AddConnectedRecently (GetRemoteEndpoint (), i2p::util::GetSecondsSinceEpoch ());
GetServer ().RequestRemoveSession (GetConnID ());
break;
}
Expand Down

0 comments on commit 6776324

Please sign in to comment.