mirror of
https://github.com/espressif/openthread.git
synced 2026-08-25 19:59:51 +00:00
fix routing table issue (#720)
This commit is contained in:
@@ -168,6 +168,16 @@ ThreadError MleRouter::ReleaseRouterId(uint8_t aRouterId)
|
||||
mRouters[aRouterId].mReclaimDelay = true;
|
||||
mRouters[aRouterId].mState = Neighbor::kStateInvalid;
|
||||
mRouters[aRouterId].mNextHop = kInvalidRouterId;
|
||||
|
||||
for (uint8_t i = 0; i <= kMaxRouterId; i++)
|
||||
{
|
||||
if (mRouters[i].mNextHop == aRouterId)
|
||||
{
|
||||
mRouters[i].mNextHop = kInvalidRouterId;
|
||||
mRouters[i].mCost = 0;
|
||||
}
|
||||
}
|
||||
|
||||
mRouterIdSequence++;
|
||||
mRouterIdSequenceLastUpdated = Timer::GetNow();
|
||||
mAddressResolver.Remove(aRouterId);
|
||||
|
||||
Reference in New Issue
Block a user