wifi: Mark an MPDU as acknowledged before removing it from the in-flight queue

This avoids a crash in the event that an MPDU sent in an S-MPDU under
a Block Ack agreement is acknowledged after its lifetime expired.
This commit is contained in:
Stefano Avallone
2021-10-06 17:16:08 +02:00
parent a34c01091c
commit 96fdc81c68

View File

@@ -444,6 +444,8 @@ BlockAckManager::NotifyGotAck (Ptr<const WifiMacQueueItem> mpdu)
AgreementsI it = m_agreements.find (std::make_pair (recipient, tid));
NS_ASSERT (it != m_agreements.end ());
it->second.first.NotifyAckedMpdu (mpdu);
// remove the acknowledged frame from the queue of outstanding packets
for (auto queueIt = it->second.second.begin (); queueIt != it->second.second.end (); ++queueIt)
{
@@ -453,8 +455,6 @@ BlockAckManager::NotifyGotAck (Ptr<const WifiMacQueueItem> mpdu)
break;
}
}
it->second.first.NotifyAckedMpdu (mpdu);
}
void