mirror of
https://github.com/espressif/openthread.git
synced 2026-07-31 16:17:47 +00:00
[mle] remove assert in MleRouter::ResolveRoutingLoops() (#2022)
This commit is contained in:
@@ -3717,16 +3717,23 @@ exit:
|
||||
|
||||
void MleRouter::ResolveRoutingLoops(uint16_t aSourceMac, uint16_t aDestRloc16)
|
||||
{
|
||||
if (aSourceMac == GetNextHop(aDestRloc16))
|
||||
{
|
||||
// loop detected
|
||||
Router *router = GetRouter(GetRouterId(aDestRloc16));
|
||||
assert(router != NULL);
|
||||
Router *router;
|
||||
|
||||
// invalidate next hop
|
||||
router->SetNextHop(kInvalidRouterId);
|
||||
ResetAdvertiseInterval();
|
||||
if (aSourceMac != GetNextHop(aDestRloc16))
|
||||
{
|
||||
ExitNow();
|
||||
}
|
||||
|
||||
// loop exists
|
||||
router = GetRouter(GetRouterId(aDestRloc16));
|
||||
VerifyOrExit(router != NULL);
|
||||
|
||||
// invalidate next hop
|
||||
router->SetNextHop(kInvalidRouterId);
|
||||
ResetAdvertiseInterval();
|
||||
|
||||
exit:
|
||||
return;
|
||||
}
|
||||
|
||||
otError MleRouter::CheckReachability(uint16_t aMeshSource, uint16_t aMeshDest, Ip6::Header &aIp6Header)
|
||||
|
||||
Reference in New Issue
Block a user