mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-24 09:56:35 +02:00
check RouterInfo's timestamp in SessionConfirmed
This commit is contained in:
parent
358cdcf4c4
commit
2dfa1ca0f2
1 changed files with 6 additions and 0 deletions
|
@ -709,6 +709,12 @@ namespace transport
|
|||
SendTerminationAndTerminate (eNTCP2RouterInfoSignatureVerificationFail);
|
||||
return;
|
||||
}
|
||||
if (i2p::util::GetMillisecondsSinceEpoch () > ri.GetTimestamp () + i2p::data::NETDB_MIN_EXPIRATION_TIMEOUT*1000LL) // 90 minutes
|
||||
{
|
||||
LogPrint (eLogError, "NTCP2: RouterInfo is too old in SessionConfirmed");
|
||||
SendTerminationAndTerminate (eNTCP2Message3Error);
|
||||
return;
|
||||
}
|
||||
auto addr = ri.GetNTCP2Address (false); // any NTCP2 address
|
||||
if (!addr)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue