[mle] avoid link dead lock (#11030)

The current MLE Link Request handler would result in dead lock if two
routers sends Link Request to each other at very close time points, when
either node tracks the other node in LinkRequest state, so rejects the
request until timeout.

This commit changes the handler so that a node will accept the Link
Request even if the peer is in LinkRequest state.
This commit is contained in:
Yakun Xu
2024-12-13 14:39:21 -08:00
committed by GitHub
parent 9404feeac9
commit 93ef72ad92
-1
View File
@@ -707,7 +707,6 @@ void MleRouter::HandleLinkRequest(RxInfo &aRxInfo)
{
neighbor = mRouterTable.FindRouterByRloc16(sourceAddress);
VerifyOrExit(neighbor != nullptr, error = kErrorParse);
VerifyOrExit(!neighbor->IsStateLinkRequest(), error = kErrorAlready);
if (!neighbor->IsStateValid())
{