mirror of
https://github.com/espressif/openthread.git
synced 2026-09-07 09:40:12 +00:00
[mle] minor TLV and route table cleanup (#2807)
This commit is contained in:
committed by
Jonathan Hui
parent
b5f22dcb5d
commit
403723dc82
@@ -716,8 +716,8 @@ private:
|
||||
kRouteCostMask = 0xf << kRouteCostOffset,
|
||||
};
|
||||
uint8_t mRouterIdSequence;
|
||||
uint8_t mRouterIdMask[BitVectorBytes(Mle::kMaxRouterId)];
|
||||
uint8_t mRouteData[Mle::kMaxRouters];
|
||||
uint8_t mRouterIdMask[BitVectorBytes(Mle::kMaxRouterId + 1)];
|
||||
uint8_t mRouteData[Mle::kMaxRouterId + 1];
|
||||
} OT_TOOL_PACKED_END;
|
||||
|
||||
/**
|
||||
|
||||
@@ -534,14 +534,11 @@ void RouterTable::ProcessTlv(const Mle::RouteTlv &aTlv)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsAllocated(i))
|
||||
{
|
||||
Router *router = GetRouter(i);
|
||||
Router *router = GetRouter(i);
|
||||
|
||||
assert(router != NULL);
|
||||
router->SetNextHop(Mle::kInvalidRouterId);
|
||||
RemoveNeighbor(*router);
|
||||
}
|
||||
assert(router != NULL);
|
||||
router->SetNextHop(Mle::kInvalidRouterId);
|
||||
RemoveNeighbor(*router);
|
||||
|
||||
mAllocatedRouterIds[i / 8] &= ~(1 << (i % 8));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user