mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-21 06:41:48 +02:00
don't adjust clock if offsets came from same router
This commit is contained in:
parent
c5a1806528
commit
70639f1139
3 changed files with 26 additions and 12 deletions
libi2pd
|
@ -1671,10 +1671,10 @@ namespace transport
|
|||
if (std::abs (offset) > SSU2_CLOCK_THRESHOLD)
|
||||
{
|
||||
LogPrint (eLogWarning, "SSU2: Time offset ", offset, " from ", m_RemoteEndpoint);
|
||||
m_Server.AdjustTimeOffset (-offset);
|
||||
m_Server.AdjustTimeOffset (-offset, GetRemoteIdentity ());
|
||||
}
|
||||
else
|
||||
m_Server.AdjustTimeOffset (0);
|
||||
m_Server.AdjustTimeOffset (0, nullptr);
|
||||
}
|
||||
else if (std::abs (offset) > SSU2_CLOCK_SKEW)
|
||||
{
|
||||
|
@ -2485,7 +2485,7 @@ namespace transport
|
|||
i2p::context.SetTestingV6 (testing);
|
||||
}
|
||||
if (!testing)
|
||||
m_Server.AdjustTimeOffset (0); // reset time offset when testing is over
|
||||
m_Server.AdjustTimeOffset (0, nullptr); // reset time offset when testing is over
|
||||
}
|
||||
|
||||
size_t SSU2Session::CreateAddressBlock (uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& ep)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue