mirror of
https://github.com/espressif/openthread.git
synced 2026-07-07 12:52:35 +00:00
[mesh-local-prefix] remove coupling to Extended PAN ID (#7686)
Deriving the Mesh Local Prefix from the Extended PAN ID was carried forward from legacy implementations. Removing this coupling to conform to the existing Thread Specification.
This commit is contained in:
@@ -63,15 +63,11 @@ otError otThreadSetExtendedPanId(otInstance *aInstance, const otExtendedPanId *a
|
||||
Error error = kErrorNone;
|
||||
Instance & instance = AsCoreType(aInstance);
|
||||
const MeshCoP::ExtendedPanId &extPanId = AsCoreType(aExtendedPanId);
|
||||
Mle::MeshLocalPrefix prefix;
|
||||
|
||||
VerifyOrExit(instance.Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
|
||||
|
||||
instance.Get<MeshCoP::ExtendedPanIdManager>().SetExtPanId(extPanId);
|
||||
|
||||
prefix.SetFromExtendedPanId(extPanId);
|
||||
instance.Get<Mle::MleRouter>().SetMeshLocalPrefix(prefix);
|
||||
|
||||
instance.Get<MeshCoP::ActiveDatasetManager>().Clear();
|
||||
instance.Get<MeshCoP::PendingDatasetManager>().Clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user