lrwpan: Remove unnecessary Bcst filter from MAC

This commit is contained in:
Alberto Gallegos Ramonet
2023-07-24 14:23:22 +09:00
parent 6cf99e322d
commit 73b7e64603
4 changed files with 14 additions and 18 deletions

View File

@@ -23,6 +23,7 @@ Changes from ns-3.39 to ns-3-dev
* (energy) Added `GenericBatteryModel` to the energy module with working examples.
* (energy) Support for battery presets and cell packs.
* (energy) Documentation was updated and reformatted.
* (lr-wpan) Removed unnecessary bcst filter from `LrWpanMac::PdDataIndication` which also blocked the correct reception of beacon request commands.
### Changes to build system

View File

@@ -25,6 +25,8 @@ Release 3-dev
### Bugs fixed
- (lr-wpan) - !1591 - Removed unnecessary Bcst filter from MAC
Release 3.39
------------

View File

@@ -1974,21 +1974,6 @@ LrWpanMac::PdDataIndication(uint32_t psduLength, Ptr<Packet> p, uint8_t lqi)
(m_macPanId == 0xffff && receivedMacHdr.IsCommand());
}
if (acceptFrame && (receivedMacHdr.GetShortDstAddr() == Mac16Address("FF:FF")))
{
// TODO: shouldn't this be filtered by the PHY?
// A broadcast message (e.g. beacons, orphan notifications) should not be received
// by the device who issues it.
if (receivedMacHdr.GetSrcAddrMode() == EXT_ADDR)
{
acceptFrame = (receivedMacHdr.GetExtSrcAddr() != GetExtendedAddress());
}
else
{
acceptFrame = (receivedMacHdr.GetShortSrcAddr() != GetShortAddress());
}
}
if (acceptFrame && (receivedMacHdr.GetDstAddrMode() == SHORT_ADDR))
{
if (receivedMacHdr.GetShortDstAddr() == m_shortAddress)

View File

@@ -308,6 +308,7 @@ class TestActiveScanPanDescriptors : public TestCase
* \param params MLME scan confirm parameters
*/
void ScanConfirm(MlmeScanConfirmParams params);
/**
* Function used to notify the reception of a beacon with payload.
*
@@ -380,9 +381,16 @@ TestActiveScanPanDescriptors::DoRun()
Ptr<LrWpanNetDevice> endNodeNetDevice = CreateObject<LrWpanNetDevice>();
Ptr<LrWpanNetDevice> coord2NetDevice = CreateObject<LrWpanNetDevice>();
coord1NetDevice->SetAddress(Mac16Address("00:01"));
endNodeNetDevice->SetAddress(Mac16Address("00:02"));
coord2NetDevice->SetAddress(Mac16Address("00:03"));
// PAN coordinators typically have a short address = 00:00 (e.g. Zigbee networks)
coord1NetDevice->GetMac()->SetExtendedAddress("00:00:00:00:00:00:CA:FE");
coord1NetDevice->GetMac()->SetShortAddress(Mac16Address("00:00"));
coord2NetDevice->GetMac()->SetExtendedAddress("00:00:00:00:00:00:BE:BE");
coord2NetDevice->GetMac()->SetShortAddress(Mac16Address("00:00"));
// An end device currently not associated (short address = ff:ff)
endNodeNetDevice->GetMac()->SetExtendedAddress("00:00:00:00:00:00:00:03");
endNodeNetDevice->GetMac()->SetShortAddress(Mac16Address("ff:ff"));
// Configure Spectrum channel
Ptr<SingleModelSpectrumChannel> channel = CreateObject<SingleModelSpectrumChannel>();