[mle] check router role allowed before sending multicast adv (#12876)

This commit updates `Mle::SendMulticastAdvertisement()` to verify
that the router role is allowed by calling `IsRouterRoleAllowed()`
before proceeding to send the multicast MLE advertisement.
This commit is contained in:
Abtin Keshavarzian
2026-04-14 21:38:56 -07:00
committed by GitHub
parent e2d07be235
commit 8a032575da
+8 -1
View File
@@ -539,7 +539,14 @@ exit:
return;
}
void Mle::SendMulticastAdvertisement(void) { SendAdvertisement(Ip6::Address::GetLinkLocalAllNodesMulticast()); }
void Mle::SendMulticastAdvertisement(void)
{
VerifyOrExit(IsRouterRoleAllowed());
SendAdvertisement(Ip6::Address::GetLinkLocalAllNodesMulticast());
exit:
return;
}
void Mle::ScheduleUnicastAdvertisementTo(const Router &aRouter)
{