mirror of
https://github.com/espressif/openthread.git
synced 2026-10-22 07:28:17 +00:00
[mle] fix incorrect error code for malformed CSL Timeout TLV (#13610)
The `default:` arm for `Tlv::Find<CslTimeoutTlv>()` set `error` to `kErrorNone` instead of `kErrorParse` when the TLV was malformed, unlike every other TLV parsed in this function. Because `LogProcessError()` only logs a warning when the error is non-zero, a malformed CSL Timeout TLV (e.g. a truncated value) was silently dropped with no diagnostic, instead of being logged as a parse error like other malformed TLVs in a Child Update Request.
This commit is contained in:
@@ -2355,7 +2355,7 @@ void Mle::HandleChildUpdateRequestOnParent(RxInfo &aRxInfo)
|
||||
case kErrorNotFound:
|
||||
break;
|
||||
default:
|
||||
ExitNow(error = kErrorNone);
|
||||
ExitNow(error = kErrorParse);
|
||||
}
|
||||
|
||||
switch (Tlv::Find<CslChannelTlv>(aRxInfo.mMessage, cslChannelTlvValue))
|
||||
|
||||
Reference in New Issue
Block a user