mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 13:27:17 +01:00
check for max number of NACKs
This commit is contained in:
parent
f75de6af82
commit
8a478e4616
|
@ -378,6 +378,12 @@ namespace stream
|
|||
for (auto it: m_SavedPackets)
|
||||
{
|
||||
auto seqn = it->GetSeqn ();
|
||||
if (numNacks + (seqn - nextSeqn) >= 256)
|
||||
{
|
||||
LogPrint (eLogError, "Number of NACKs exceeds 256");
|
||||
htobe32buf (packet + 12, nextSeqn); // change ack Through
|
||||
break;
|
||||
}
|
||||
for (uint32_t i = nextSeqn; i < seqn; i++)
|
||||
{
|
||||
htobe32buf (nacks, i);
|
||||
|
|
Loading…
Reference in a new issue