Skip to content

Commit

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

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 authored May 8, 2024
1 parent 07e3098 commit a4562ae
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 a4562ae

Please sign in to comment.