You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed a bug in the 802.11 model which prevented RTS/CTS from ever being used. The old version tried to access a variable which had been moved, causing it to always return 0.
Developed by: Chris Pollard
diff --git a/src/models/mac/ieee80211abg/maclayer.cc b/src/models/mac/ieee80211abg/maclayer.cc
index bf5a18f..d743a29 100644
--- a/src/models/mac/ieee80211abg/maclayer.cc+++ b/src/models/mac/ieee80211abg/maclayer.cc@@ -1161,6 +1161,7 @@ EMANE::Models::IEEE80211ABG::MACLayer::processDownstreamPacket(DownstreamPacket
std::uint8_t u8Retries{isBroadcast(pktInfo.getDestination()) ?
std::uint8_t{} : macConfig_.getRetryLimit(u8Category)};
+ // this moves pkt, making it invalid, use entry.pkt_ from now on
DownstreamQueueEntry entry{pkt,
timeNow,
macConfig_.getTxOpMicroseconds(u8Category),
@@ -1168,7 +1169,7 @@ EMANE::Models::IEEE80211ABG::MACLayer::processDownstreamPacket(DownstreamPacket
u8Retries};
// check rts cts enable
- if((macConfig_.getRtsThreshold() != 0) &&(macConfig_.getRtsThreshold() <= pkt.length()))+ if((macConfig_.getRtsThreshold() != 0) &&(macConfig_.getRtsThreshold() <= entry.pkt_.length()))
{
// set rts cts flag
entry.bRtsCtsEnable_ = true;
The text was updated successfully, but these errors were encountered:
being used. The old version tried to access a variable which had been
moved, causing it to always return 0.
Submitted-by: David Ward <david.ward@ll.mit.edu>
Developed-by: Christopher Pollard <Christopher.Pollard@ll.mit.edu>
See #21
Reported via email by David Ward:
Fixed a bug in the 802.11 model which prevented RTS/CTS from ever being used. The old version tried to access a variable which had been moved, causing it to always return 0.
Developed by: Chris Pollard
The text was updated successfully, but these errors were encountered: