limit SSU message size to 32K

This commit is contained in:
orignal 2018-10-11 11:17:14 -04:00
parent a97300f8be
commit b84f74c167
3 changed files with 10 additions and 3 deletions

View file

@ -929,7 +929,13 @@ namespace transport
if (m_State == eSessionStateEstablished)
{
for (const auto& it: msgs)
if (it) m_Data.Send (it);
if (it)
{
if (it->GetLength () <= SSU_MAX_I2NP_MESSAGE_SIZE)
m_Data.Send (it);
else
LogPrint (eLogError, "SSU: I2NP message of size ", it->GetLength (), " can't be sent. Dropped");
}
}
}