[mle] reduce log error spam when Mle::IsDisabled() (#12763)

This commit updates `Mle::HandleUdpReceive()` to avoid logging an error
when an MLE message is received while MLE is disabled.

When `IsDisabled()` is true, the `VerifyOrExit` macro now exits the
method without setting `error` to `kErrorInvalidState`. This ensures
that the `LogProcessError()` call at the `exit` label does not emit an
error log. This reduces log spam during testing/debugging.
This commit is contained in:
Abtin Keshavarzian
2026-03-25 21:21:51 -05:00
committed by GitHub
parent c923900de0
commit 9ca942c313
+1 -1
View File
@@ -1604,7 +1604,7 @@ void Mle::HandleUdpReceive(Message &aMessage, const Ip6::MessageInfo &aMessageIn
ExitNow();
}
VerifyOrExit(!IsDisabled(), error = kErrorInvalidState);
VerifyOrExit(!IsDisabled());
VerifyOrExit(securitySuite == k154Security, error = kErrorParse);
SuccessOrExit(error = aMessage.ReadAtAndAdvanceOffset(header));