mirror of
https://github.com/espressif/openthread.git
synced 2026-10-18 05:28:10 +00:00
[mac] don't append header termination IE2 for empty data payload (#7123)
We do not require the HT2 IE if the only thing that follows the header is the MIC. This commit reverts #6941.
This commit is contained in:
@@ -1582,10 +1582,8 @@ void MeshForwarder::AppendHeaderIe(const Message *aMessage, Mac::TxFrame &aFrame
|
|||||||
{
|
{
|
||||||
uint8_t index = 0;
|
uint8_t index = 0;
|
||||||
bool iePresent = false;
|
bool iePresent = false;
|
||||||
// MIC is a part of Data Payload, so if it's present, Data Payload is not empty even if the message is
|
bool payloadPresent =
|
||||||
// MIC is always present when the frame is secured
|
(aFrame.GetType() == Mac::Frame::kFcfFrameMacCmd) || (aMessage != nullptr && aMessage->GetLength() != 0);
|
||||||
bool payloadPresent = (aFrame.GetType() == Mac::Frame::kFcfFrameMacCmd) ||
|
|
||||||
(aMessage != nullptr && aMessage->GetLength() != 0) || aFrame.GetSecurityEnabled();
|
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
|
#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
|
||||||
if (aMessage != nullptr && aMessage->IsTimeSync())
|
if (aMessage != nullptr && aMessage->IsTimeSync())
|
||||||
|
|||||||
Reference in New Issue
Block a user