mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 03:07:47 +00:00
[sub-mac] check `IsHeaderUpdated() before signaling counter (#7029)
This commit adds a check in `SignalFrameCounterUsedOnTxDone()` to ensure that radio platform did indeed update the header (i.e., assigned a frame counter) before reading the counter value from the frame and signaling its use.
This commit is contained in:
committed by
Jonathan Hui
parent
645dec173a
commit
47efcc6745
@@ -579,7 +579,7 @@ void SubMac::SignalFrameCounterUsedOnTxDone(const TxFrame &aFrame)
|
||||
|
||||
OT_UNUSED_VARIABLE(allowError);
|
||||
|
||||
VerifyOrExit(!ShouldHandleTransmitSecurity() && aFrame.GetSecurityEnabled());
|
||||
VerifyOrExit(!ShouldHandleTransmitSecurity() && aFrame.GetSecurityEnabled() && aFrame.IsHeaderUpdated());
|
||||
|
||||
// In an FTD/MTD build, if/when link-raw is enabled, the `TxFrame`
|
||||
// is prepared and given by user and may not necessarily follow 15.4
|
||||
|
||||
Reference in New Issue
Block a user