Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mle] retain direct child cache entries on Addr Solicit Response TX #9956

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/core/thread/mle_router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3674,7 +3674,10 @@ void MleRouter::SendAddressSolicitResponse(const Coap::Message &aRequest,

// If assigning a new RLOC16 (e.g., on promotion of a child to
// router role) we clear any address cache entries associated
// with the old RLOC16.
// with the old RLOC16 unless the sender is a direct child. For
// direct children, we retain the cache entries to allow
// association with the promoted router's new RLOC16 upon
// receiving its Link Advertisement.

if ((aResponseStatus == ThreadStatusTlv::kSuccess) && (aRouter != nullptr))
{
Expand All @@ -3684,6 +3687,7 @@ void MleRouter::SendAddressSolicitResponse(const Coap::Message &aRequest,
oldRloc16 = aMessageInfo.GetPeerAddr().GetIid().GetLocator();

VerifyOrExit(oldRloc16 != aRouter->GetRloc16());
VerifyOrExit(!RouterIdMatch(oldRloc16, GetRloc16()));
Get<AddressResolver>().RemoveEntriesForRloc16(oldRloc16);
}

Expand Down