mirror of
https://github.com/espressif/openthread.git
synced 2026-09-05 16:50:05 +00:00
route cost to self (#1787)
This commit is contained in:
@@ -386,7 +386,9 @@ ThreadError LeaderBase::DefaultRouteLookup(PrefixTlv &aPrefix, uint16_t *aRloc16
|
||||
if (route == NULL ||
|
||||
entry->GetPreference() > route->GetPreference() ||
|
||||
(entry->GetPreference() == route->GetPreference() &&
|
||||
mNetif.GetMle().GetCost(entry->GetRloc()) < mNetif.GetMle().GetCost(route->GetRloc())))
|
||||
(entry->GetRloc() == mNetif.GetMle().GetRloc16() ||
|
||||
(route->GetRloc() != mNetif.GetMle().GetRloc16() &&
|
||||
mNetif.GetMle().GetCost(entry->GetRloc()) < mNetif.GetMle().GetCost(route->GetRloc())))))
|
||||
{
|
||||
route = entry;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user