mirror of
https://github.com/espressif/openthread.git
synced 2026-09-10 11:10:08 +00:00
[netif] add diagnostic log for when no valid route is found (#8907)
The added log may assist in diagnosing problems where packet transmission over the air is absent. Signed-off-by: Lukasz Duda <[email protected]>
This commit is contained in:
+10
-4
@@ -1448,14 +1448,20 @@ Error Ip6::RouteLookup(const Address &aSource, const Address &aDestination) cons
|
||||
Error error;
|
||||
uint16_t rloc;
|
||||
|
||||
SuccessOrExit(error = Get<NetworkData::Leader>().RouteLookup(aSource, aDestination, rloc));
|
||||
error = Get<NetworkData::Leader>().RouteLookup(aSource, aDestination, rloc);
|
||||
|
||||
if (rloc == Get<Mle::Mle>().GetRloc16())
|
||||
if (error == kErrorNone)
|
||||
{
|
||||
error = kErrorNoRoute;
|
||||
if (rloc == Get<Mle::MleRouter>().GetRloc16())
|
||||
{
|
||||
error = kErrorNoRoute;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogNote("Failed to find valid route for: %s", aDestination.ToString().AsCString());
|
||||
}
|
||||
|
||||
exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user