wifi: fix condition for old packets in BlockAckManager::NeedBarRetransmission

Sequence numbers should be compared modulo 4096.
Also, window size may not be equal to 64.

Fixes issue #48
This commit is contained in:
Alexander Krotov
2019-04-11 14:22:45 +03:00
parent c167fbd771
commit 804b76574b

View File

@@ -824,7 +824,7 @@ bool BlockAckManager::NeedBarRetransmission (uint8_t tid, uint16_t seqNumber, Ma
AgreementsI it = m_agreements.find (std::make_pair (recipient, tid));
NS_ASSERT (it != m_agreements.end ());
CleanupBuffers ();
if ((seqNumber + 63) < it->second.first.GetStartingSequence ())
if (QosUtilsIsOldPacket (it->second.first.GetStartingSequence (), seqNumber))
{
return false;
}