From 9ca942c313a8d0bed5431b7f7d97be16e9774a0d Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Wed, 25 Mar 2026 19:21:51 -0700 Subject: [PATCH] [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. --- src/core/thread/mle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index 0b90a4dac..cbaa0391c 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -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));