[mle] fix invalid router after ProcessRouteTlv (#5200)

We always need to update existing router references after calling
ProcessRouteTlv.
This commit is contained in:
Simon Lin
2020-07-07 11:11:17 -07:00
committed by GitHub
parent f490ea658c
commit d3a429b1ea
+3
View File
@@ -972,6 +972,9 @@ otError MleRouter::HandleLinkAccept(const Message & aMessage,
VerifyOrExit(route.IsValid(), error = OT_ERROR_PARSE);
SuccessOrExit(error = ProcessRouteTlv(route));
UpdateRoutes(route, routerId);
// need to update router after ProcessRouteTlv
router = mRouterTable.GetRouter(routerId);
OT_ASSERT(router != nullptr);
}
// update routing table