From 54af1ee416c7988ad9338ff932c997a3ab263cae Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Sun, 26 Sep 2021 22:17:34 -0700 Subject: [PATCH] [key-manager] set frame counter on `SubMac` on a counter reset (#7034) This commit changes `KeyManager` to use `SetAllMacFrameCounter(0)` to reset the frame counter(s). This would then ensure that the new counter value is also set on `SubMac` and radio platform layer (which can handle the 15.4 frame counter assignments). This addresses an issue where on Key Sequence update the frame counter values on `SubMac` and radio platform can remain unchanged. --- src/core/thread/key_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/thread/key_manager.cpp b/src/core/thread/key_manager.cpp index 7ac5bfbdf..625c77431 100644 --- a/src/core/thread/key_manager.cpp +++ b/src/core/thread/key_manager.cpp @@ -388,7 +388,7 @@ void KeyManager::SetCurrentKeySequence(uint32_t aKeySequence) mKeySequence = aKeySequence; UpdateKeyMaterial(); - mMacFrameCounters.Reset(); + SetAllMacFrameCounters(0); mMleFrameCounter = 0; Get().Signal(kEventThreadKeySeqCounterChanged);