wifi: Check that frame belongs to BSS before setting the TXOP holder
This commit is contained in:
@@ -1542,9 +1542,9 @@ HeFrameExchangeManager::SetTxopHolder(Ptr<const WifiPsdu> psdu, const WifiTxVect
|
||||
{
|
||||
NS_LOG_FUNCTION(this << psdu << txVector);
|
||||
|
||||
if (psdu->GetHeader(0).IsTrigger())
|
||||
if (psdu->GetHeader(0).IsTrigger() && psdu->GetAddr2() == m_bssid)
|
||||
{
|
||||
m_txopHolder = psdu->GetAddr2();
|
||||
m_txopHolder = m_bssid;
|
||||
}
|
||||
else if (!txVector.IsUlMu()) // the sender of a TB PPDU is not the TXOP holder
|
||||
{
|
||||
|
||||
@@ -683,11 +683,16 @@ QosFrameExchangeManager::SetTxopHolder(Ptr<const WifiPsdu> psdu, const WifiTxVec
|
||||
|
||||
const WifiMacHeader& hdr = psdu->GetHeader(0);
|
||||
|
||||
if (hdr.IsQosData() || hdr.IsMgt() || hdr.IsRts())
|
||||
// A STA shall save the TXOP holder address for the BSS in which it is associated.
|
||||
// The TXOP holder address is the MAC address from the Address 2 field of the frame
|
||||
// that initiated a frame exchange sequence, except if this is a CTS frame, in which
|
||||
// case the TXOP holder address is the Address 1 field. (Sec. 10.23.2.4 of 802.11-2020)
|
||||
if ((hdr.IsQosData() || hdr.IsMgt() || hdr.IsRts()) &&
|
||||
(hdr.GetAddr1() == m_bssid || hdr.GetAddr2() == m_bssid))
|
||||
{
|
||||
m_txopHolder = psdu->GetAddr2();
|
||||
}
|
||||
else if (hdr.IsCts())
|
||||
else if (hdr.IsCts() && hdr.GetAddr1() == m_bssid)
|
||||
{
|
||||
m_txopHolder = psdu->GetAddr1();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user