drop too short follow on SSU2 packets

This commit is contained in:
orignal 2024-09-26 08:48:17 -04:00
parent 32ad4b4858
commit 75b1c144b4

View File

@ -377,7 +377,10 @@ namespace transport
if (!ec)
{
i2p::transport::transports.UpdateReceivedBytes (packet->len);
if (packet->len >= SSU2_MIN_RECEIVED_PACKET_SIZE)
packets.push_back (packet);
else // drop too short packets
m_PacketsPool.ReleaseMt (packet);
moreBytes = socket.available(ec);
if (ec) break;
}