mirror of
https://github.com/espressif/openthread.git
synced 2026-11-08 23:41:00 +00:00
Remove mNextHop value if it is set to link being removed. (#1311)
This commit is contained in:
@@ -1819,6 +1819,20 @@ void MleRouter::HandleStateUpdateTimer(void)
|
||||
mRouters[i].mLinkQualityOut = 0;
|
||||
mRouters[i].mLastHeard = Timer::GetNow();
|
||||
|
||||
for (uint8_t j = 0; j <= kMaxRouterId; j++)
|
||||
{
|
||||
if (mRouters[j].mNextHop == i)
|
||||
{
|
||||
mRouters[j].mNextHop = kInvalidRouterId;
|
||||
mRouters[j].mCost = 0;
|
||||
|
||||
if (GetLinkCost(j) >= kMaxRouteCost)
|
||||
{
|
||||
ResetAdvertiseInterval();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mRouters[i].mNextHop == kInvalidRouterId)
|
||||
{
|
||||
ResetAdvertiseInterval();
|
||||
|
||||
Reference in New Issue
Block a user