[mle] add address outside of constructor (#3251)

This commit adds link local address when MLE is enabled. Adding address in
constructor gives no chance to notify address change with address
callback.
This commit is contained in:
Yakun Xu
2018-11-06 12:46:08 +08:00
committed by Jonathan Hui
parent f8909593a9
commit 8533ee3936
6 changed files with 97 additions and 37 deletions
+1 -1
View File
@@ -206,7 +206,7 @@ otError otThreadSetMeshLocalPrefix(otInstance *aInstance, const otMeshLocalPrefi
VerifyOrExit(instance.GetThreadNetif().GetMle().GetRole() == OT_DEVICE_ROLE_DISABLED,
error = OT_ERROR_INVALID_STATE);
error = instance.GetThreadNetif().GetMle().SetMeshLocalPrefix(*aMeshLocalPrefix);
instance.GetThreadNetif().GetMle().SetMeshLocalPrefix(*aMeshLocalPrefix);
instance.GetThreadNetif().GetActiveDataset().Clear();
instance.GetThreadNetif().GetPendingDataset().Clear();