From 5d6c151fdb4a4fb6d95017e6a71932b5e27114f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Ba=C5=82ys?= Date: Tue, 30 Apr 2024 15:06:04 +0200 Subject: [PATCH] [OpenThread] Disable IPv6 interface during erasing persistent info. (#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). --- .../OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp index 35c547f4d52d25..1b7f1c52deeaa9 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp @@ -1220,6 +1220,7 @@ void GenericThreadStackManagerImpl_OpenThread::_ErasePersistentInfo(v ChipLogProgress(DeviceLayer, "Erasing Thread persistent info..."); Impl()->LockThreadStack(); otThreadSetEnabled(mOTInst, false); + otIp6SetEnabled(mOTInst, false); otInstanceErasePersistentInfo(mOTInst); Impl()->UnlockThreadStack(); }