From 79cd48277695f73e260efadc47ed4f6b3cbad6dd Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Thu, 16 Sep 2021 14:38:35 -0700 Subject: [PATCH] [mesh-forwarder] call `UpdateRoutes` on rx of first fragment frame (#7015) This commit ensures to call `UpdateRoutes()` on rx of a first lowpan fragment frame. `UpdateRoutes()` can then update the snooped address cache entries and check if the message is from a previous child (which indicates that the child has switched to a new parent). This change should help address an issue with "inform previous parent" behavior not removing the child when `MULTI_RADIO` is enabled (due to frag header added to the frames for duplication detection under multi-radio). --- src/core/thread/mesh_forwarder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/thread/mesh_forwarder.cpp b/src/core/thread/mesh_forwarder.cpp index 5dd8af920..567d4eda3 100644 --- a/src/core/thread/mesh_forwarder.cpp +++ b/src/core/thread/mesh_forwarder.cpp @@ -1242,6 +1242,10 @@ void MeshForwarder::HandleFragment(const uint8_t * aFrame, { uint16_t datagramSize = fragmentHeader.GetDatagramSize(); +#if OPENTHREAD_FTD + UpdateRoutes(aFrame, aFrameLength, aMacSource, aMacDest); +#endif + error = FrameToMessage(aFrame, aFrameLength, datagramSize, aMacSource, aMacDest, message); SuccessOrExit(error);