mirror of
https://github.com/espressif/openthread.git
synced 2026-10-01 21:37:39 +00:00
[mle] fix invalid router after ProcessRouteTlv (#5200)
We always need to update existing router references after calling ProcessRouteTlv.
This commit is contained in:
@@ -972,6 +972,9 @@ otError MleRouter::HandleLinkAccept(const Message & aMessage,
|
|||||||
VerifyOrExit(route.IsValid(), error = OT_ERROR_PARSE);
|
VerifyOrExit(route.IsValid(), error = OT_ERROR_PARSE);
|
||||||
SuccessOrExit(error = ProcessRouteTlv(route));
|
SuccessOrExit(error = ProcessRouteTlv(route));
|
||||||
UpdateRoutes(route, routerId);
|
UpdateRoutes(route, routerId);
|
||||||
|
// need to update router after ProcessRouteTlv
|
||||||
|
router = mRouterTable.GetRouter(routerId);
|
||||||
|
OT_ASSERT(router != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update routing table
|
// update routing table
|
||||||
|
|||||||
Reference in New Issue
Block a user