Bugzilla – Bug 2928
BlockAckManager::NeedBarRetransmission returns "true" infinitely
Last modified: 2020-03-08 13:13:32 EDT
I have added multiple packets to the queue, then manually deleted them. NeedBarRetransmission checks if ((seqNumber + 63) < it->second.first.GetStartingSequence ()) where seqNumber is the sequence number of the statring sequence of the current block, while it->second.first.GetStartingSequence () is updated by the BlockAckManager::CleanupBuffers (). Maybe manually removing packets is not expected, but what would happen if there are less that 64 packets in queue and they all expire? BlockAckRequest will be retried infinitely, even though there are no more packets left. There is a comment saying //The standard says the BAR gets discarded when all MSDUs lifetime expires in BlockAckManager::NeedBarRetransmission but I cannot find this in the standard. According to "11.5.4 Error recovery upon a peer failure" there is simply a timeout after which DELBA is triggered if no Block ack is received in response to block ack requests. Where exactly in the standard is the source of existing check? I have also a patch for https://www.nsnam.org/bugzilla/show_bug.cgi?id=2470 applied.
I have pushed quick fix https://code.nsnam.org/index.cgi/ns-3-dev/rev/bb3ff81ea4b8 that fixes my case and should not do harm, but the first condition still looks wrong. Need to add reference to the standard and consider the corner case when the queue becomes empty.
A proposed fix for this issue can be found here: https://gitlab.com/stavallo/ns-3-dev/merge_requests/52
Fixed in changeset 1b96764eada39e03619a38b53a0efaa0417200d7