mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-23 07:35:37 +02:00
check for duplicates
This commit is contained in:
parent
566909a50c
commit
ebd64c9337
2 changed files with 22 additions and 1 deletions
5
SSU.cpp
5
SSU.cpp
|
@ -84,6 +84,11 @@ namespace ssu
|
|||
else
|
||||
{
|
||||
ScheduleTermination ();
|
||||
// check for duplicate
|
||||
const uint8_t * iv = ((SSUHeader *)buf)->iv;
|
||||
if (m_ReceivedIVs.count (iv)) return; // duplicate detected
|
||||
m_ReceivedIVs.insert (iv);
|
||||
|
||||
if (m_IsSessionKey && Validate (buf, len, m_MacKey)) // try session key first
|
||||
DecryptSessionKey (buf, len);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue