mirror of
https://github.com/espressif/openthread.git
synced 2026-08-26 04:09:52 +00:00
[radio] fix ACK frame counter with previous key (#10816)
This commit tracks the frame counter used for the previous key index and use it for the ACK frame to a frame still using previous key index.
This commit is contained in:
@@ -1144,8 +1144,11 @@ void otPlatRadioSetMacKey(otInstance *aInstance,
|
||||
|
||||
otEXPECT(aPrevKey != NULL && aCurrKey != NULL && aNextKey != NULL);
|
||||
|
||||
sRadioContext.mKeyId = aKeyId;
|
||||
sRadioContext.mKeyType = aKeyType;
|
||||
sRadioContext.mKeyId = aKeyId;
|
||||
sRadioContext.mKeyType = aKeyType;
|
||||
sRadioContext.mPrevMacFrameCounter = sRadioContext.mMacFrameCounter;
|
||||
sRadioContext.mMacFrameCounter = 0;
|
||||
|
||||
memcpy(&sRadioContext.mPrevKey, aPrevKey, sizeof(otMacKeyMaterial));
|
||||
memcpy(&sRadioContext.mCurrKey, aCurrKey, sizeof(otMacKeyMaterial));
|
||||
memcpy(&sRadioContext.mNextKey, aNextKey, sizeof(otMacKeyMaterial));
|
||||
|
||||
Reference in New Issue
Block a user