[router-table] fix router next hop change on Release(aRouterId) (#8433)

This commit is contained in:
Abtin Keshavarzian
2022-11-22 17:54:57 -08:00
committed by GitHub
parent 4e44471431
commit c5af37fbc7
+1 -1
View File
@@ -291,7 +291,7 @@ Error RouterTable::Release(uint8_t aRouterId)
for (router = GetFirstEntry(); router != nullptr; router = GetNextEntry(router))
{
if (router->GetNextHop() == rloc16)
if (router->GetNextHop() == aRouterId)
{
router->SetNextHop(Mle::kInvalidRouterId);
router->SetCost(0);