From b6942c1b3079878f209b21a95153cb1f59e7cb08 Mon Sep 17 00:00:00 2001 From: sarveshkumarv3 <86755931+sarveshkumarv3@users.noreply.github.com> Date: Thu, 24 Aug 2023 09:19:03 -0700 Subject: [PATCH] [trel] bugfix for MAC security failure on key sequence change (#9371) In multi-radio scenarios, any key sequence change currently resets the MAC frame counter for the PHY link over which the first frame (with new keyId and frame counter) is received. Since the neighbor key sequence is already modified, any subsequent frame received over the alternate PHY would have match the neighbor key sequence, but potentially smaller frame counter, which leads to drops due to security failure. --- src/core/mac/mac.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index ca11ec31e2e4..5ef871961014 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -1603,6 +1603,7 @@ Error Mac::ProcessReceiveSecurity(RxFrame &aFrame, const Address &aSrcAddr, Neig { aNeighbor->SetKeySequence(keySequence); aNeighbor->SetMleFrameCounter(0); + aNeighbor->GetLinkFrameCounters().Reset(); } #if OPENTHREAD_CONFIG_MULTI_RADIO