Skip to content

Commit

Permalink
[OpenThread] Disable IPv6 interface during erasing persistent info. (p…
Browse files Browse the repository at this point in the history
…roject-chip#33170)

Apart from disabling Thread, and erasing Persistent Info, we should
disable the IPv6 interface as well and block receiving further
packets.
Otherwise, if we don't reboot the device after erasing Thread
persistent data, we can get a packet and as a result, it causes an
assert during processing AES_ECB
(because crypto keys have been removed).
  • Loading branch information
ArekBalysNordic committed May 8, 2024
1 parent 07e3098 commit 5d6c151
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,7 @@ void GenericThreadStackManagerImpl_OpenThread<ImplClass>::_ErasePersistentInfo(v
ChipLogProgress(DeviceLayer, "Erasing Thread persistent info...");
Impl()->LockThreadStack();
otThreadSetEnabled(mOTInst, false);
otIp6SetEnabled(mOTInst, false);
otInstanceErasePersistentInfo(mOTInst);
Impl()->UnlockThreadStack();
}
Expand Down

0 comments on commit 5d6c151

Please sign in to comment.