mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
check RouterInfo's timestamp in SessionConfirmed
This commit is contained in:
parent
358cdcf4c4
commit
2dfa1ca0f2
@ -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…
x
Reference in New Issue
Block a user