mirror of
https://github.com/espressif/openthread.git
synced 2026-09-24 09:57:38 +00:00
mle.cpp: Ensure to init the mLeaderAloc and set it with correct prefix len (#857)
This commit fixes an issue with the unicast address `mLeaderAloc` to ensure that it is initialized properly and its prefix length is correctly configured.
This commit is contained in:
committed by
Jonathan Hui
parent
cc5f48d66a
commit
dcc527cf23
@@ -109,6 +109,12 @@ Mle::Mle(ThreadNetif &aThreadNetif) :
|
||||
mLinkLocal16.mPreferredLifetime = 0xffffffff;
|
||||
mLinkLocal16.mValidLifetime = 0xffffffff;
|
||||
|
||||
// Leader Aloc
|
||||
memset(&mLeaderAloc, 0, sizeof(mLeaderAloc));
|
||||
mLeaderAloc.mPrefixLength = 128;
|
||||
mLeaderAloc.mPreferredLifetime = 0xffffffff;
|
||||
mLeaderAloc.mValidLifetime = 0xffffffff;
|
||||
|
||||
// initialize Mesh Local Prefix
|
||||
mMeshLocal64.GetAddress().mFields.m8[0] = 0xfd;
|
||||
memcpy(mMeshLocal64.GetAddress().mFields.m8 + 1, mMac.GetExtendedPanId(), 5);
|
||||
|
||||
Reference in New Issue
Block a user