mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
close SSU session if MAC verification fails
This commit is contained in:
parent
56836470cf
commit
9ef8ae99e2
2 changed files with 14 additions and 1 deletions
11
SSU.cpp
11
SSU.cpp
|
@ -418,7 +418,10 @@ namespace ssu
|
|||
LogPrint ("Unexpected payload type ", (int)(header->flag >> 4));
|
||||
}
|
||||
else
|
||||
{
|
||||
LogPrint ("MAC verification failed");
|
||||
Failed ();
|
||||
}
|
||||
}
|
||||
else
|
||||
LogPrint ("SSU is not supported");
|
||||
|
@ -511,6 +514,14 @@ namespace ssu
|
|||
m_DelayedMessages.clear ();
|
||||
}
|
||||
}
|
||||
|
||||
void SSUSession::Failed ()
|
||||
{
|
||||
m_State = eSessionStateFailed;
|
||||
Close ();
|
||||
if (m_Server)
|
||||
m_Server->DeleteSession (this); // delete this
|
||||
}
|
||||
|
||||
const uint8_t * SSUSession::GetIntroKey () const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue