increased I2NP max message size to 32K and check if fragmented message exceeds it

This commit is contained in:
orignal 2014-07-04 12:35:02 -04:00
parent d4ac1391fe
commit 12fbc9cb86
4 changed files with 15 additions and 6 deletions

View file

@ -230,9 +230,9 @@ namespace i2p
else
{
// existing session not found. create new
// try NTCP first
// try NTCP first if message size < 16K
auto address = r->GetNTCPAddress ();
if (address && !r->UsesIntroducer () && !r->IsUnreachable ())
if (address && !r->UsesIntroducer () && !r->IsUnreachable () && msg->GetLength () < i2p::ntcp::NTCP_MAX_MESSAGE_SIZE)
{
auto s = new i2p::ntcp::NTCPClient (m_Service, address->host, address->port, *r);
AddNTCPSession (s);