[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).
This commit is contained in:
Jonathan Hui
2018-08-01 10:32:27 -05:00
committed by GitHub
parent 7be61df6ec
commit bcfa7edff1
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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:
+1
View File
@@ -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;
}