mirror of
https://github.com/espressif/openthread.git
synced 2026-10-30 11:14:01 +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:
|
case kErrorNotFound:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ExitNow(error = kErrorNone);
|
ExitNow(error = kErrorParse);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (Tlv::Find<CslChannelTlv>(aRxInfo.mMessage, cslChannelTlvValue))
|
switch (Tlv::Find<CslChannelTlv>(aRxInfo.mMessage, cslChannelTlvValue))
|
||||||
|
|||||||
Reference in New Issue
Block a user