mirror of
https://github.com/espressif/openthread.git
synced 2026-10-01 21:37:39 +00:00
[link-metrics] fix reading of Report sub-tlv from message (#8099)
This commit is contained in:
@@ -439,7 +439,7 @@ void LinkMetrics::HandleReport(const Message & aMessage,
|
|||||||
VerifyOrExit(!hasStatus, error = kErrorDrop);
|
VerifyOrExit(!hasStatus, error = kErrorDrop);
|
||||||
|
|
||||||
// Read the report sub-TLV assuming minimum length
|
// Read the report sub-TLV assuming minimum length
|
||||||
SuccessOrExit(error = Tlv::ReadTlv(aMessage, offset, &reportTlv, ReportSubTlv::kMinLength));
|
SuccessOrExit(error = aMessage.Read(offset, &reportTlv, sizeof(Tlv) + ReportSubTlv::kMinLength));
|
||||||
VerifyOrExit(reportTlv.IsValid(), error = kErrorParse);
|
VerifyOrExit(reportTlv.IsValid(), error = kErrorParse);
|
||||||
hasReport = true;
|
hasReport = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user