Skip to content

Commit

Permalink
wifi: Fixed potential bug with broadcasted packets when RTS-CTS prote…
Browse files Browse the repository at this point in the history
…ction is used
  • Loading branch information
sderonne committed Nov 7, 2016
1 parent 3a1d92c commit 7a7a87a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wifi/model/wifi-remote-station-manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,10 @@ WifiRemoteStationManager::NeedRts (Mac48Address address, const WifiMacHeader *he
{
WifiMode mode = txVector.GetMode ();
NS_LOG_FUNCTION (this << address << *header << packet << mode);
if (address.IsGroup ())
{
return false;
}
if (m_protectionMode == RTS_CTS
&& ((mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM)
|| (mode.GetModulationClass () == WIFI_MOD_CLASS_HT)
Expand All @@ -906,10 +910,6 @@ WifiRemoteStationManager::NeedRts (Mac48Address address, const WifiMacHeader *he
NS_LOG_DEBUG ("WifiRemoteStationManager::NeedRTS returning true to protect non-ERP stations");
return true;
}
if (address.IsGroup ())
{
return false;
}
bool normally = (packet->GetSize () + header->GetSize () + WIFI_MAC_FCS_LENGTH) > GetRtsCtsThreshold ();
return DoNeedRts (Lookup (address, header), packet, normally);
}
Expand Down

0 comments on commit 7a7a87a

Please sign in to comment.