From 583873c1339d22e4dc9bd6a08b36db648c454aa9 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Thu, 16 Jan 2020 18:55:49 -0800 Subject: [PATCH] [mle] log rloc16 changes (#4486) --- src/core/thread/mle.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index 4285a04e2..e2983de3f 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -962,6 +962,13 @@ uint16_t Mle::GetRloc16(void) const void Mle::SetRloc16(uint16_t aRloc16) { + uint16_t oldRloc16 = GetRloc16(); + + if (aRloc16 != oldRloc16) + { + otLogNoteMle("RLOC16 %04x -> %04x", oldRloc16, aRloc16); + } + Get().RemoveUnicastAddress(mMeshLocal16); Get().SetShortAddress(aRloc16);