diff --git a/src/core/mac/mac_frame.cpp b/src/core/mac/mac_frame.cpp index f109d2723..f33e17bcf 100644 --- a/src/core/mac/mac_frame.cpp +++ b/src/core/mac/mac_frame.cpp @@ -1362,6 +1362,8 @@ Error TxFrame::GenerateEnhAck(const RxFrame &aFrame, bool aIsFramePending, const SuccessOrExit(error = aFrame.GetSecurityControlField(securityControlField)); SuccessOrExit(error = aFrame.GetKeyId(keyId)); + VerifyOrExit((securityControlField & kSecLevelMask) == kSecurityEncMic32, error = kErrorParse); + SetSecurityControlField(securityControlField); SetKeyId(keyId); }