From bcfa7edff1dfff9edd8c47bc9e5d08fc65d29c5d Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Wed, 1 Aug 2018 10:32:27 -0500 Subject: [PATCH] [ip6] ensure slaac addresses are added back after reset (#2938) This commit makes the following changes: 1. A child that is resynchronizing with its parent after reset always requests the network data to ensure that it has the latest version. 2. When autoconfiguring SLAAC addresses in response to a network data update always attempt to add the netif address buffer in case the netif structure was removed (e.g. due to reset). --- src/core/thread/mle.cpp | 2 ++ src/core/utils/slaac_address.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index 038caa903..b5da6fa17 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -3491,6 +3491,8 @@ otError Mle::HandleChildUpdateResponse(const Message &aMessage, const Ip6::Messa mParent.SetState(Neighbor::kStateValid); SetStateChild(GetRloc16()); + mRetrieveNewNetworkData = true; + // fall through case OT_DEVICE_ROLE_CHILD: diff --git a/src/core/utils/slaac_address.cpp b/src/core/utils/slaac_address.cpp index d95eb7c7b..de1dbef1b 100644 --- a/src/core/utils/slaac_address.cpp +++ b/src/core/utils/slaac_address.cpp @@ -115,6 +115,7 @@ void Slaac::UpdateAddresses(otInstance * aInstance, if (otIp6PrefixMatch(&config.mPrefix.mPrefix, &address->mAddress) >= config.mPrefix.mLength && config.mPrefix.mLength == address->mPrefixLength) { + otIp6AddUnicastAddress(aInstance, address); found = true; break; }