mirror of
https://github.com/espressif/openthread.git
synced 2026-07-31 08:07:47 +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;
|
||||
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
|
||||
// MIC is always present when the frame is secured
|
||||
bool payloadPresent = (aFrame.GetType() == Mac::Frame::kFcfFrameMacCmd) ||
|
||||
(aMessage != nullptr && aMessage->GetLength() != 0) || aFrame.GetSecurityEnabled();
|
||||
bool payloadPresent =
|
||||
(aFrame.GetType() == Mac::Frame::kFcfFrameMacCmd) || (aMessage != nullptr && aMessage->GetLength() != 0);
|
||||
|
||||
#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
|
||||
if (aMessage != nullptr && aMessage->IsTimeSync())
|
||||
|
||||
Reference in New Issue
Block a user