mirror of
https://github.com/espressif/openthread.git
synced 2026-10-14 03:37:40 +00:00
[dataset] do not allow Extended TLVs in Operational Dataset (#5966)
This commit is contained in:
@@ -173,7 +173,8 @@ bool Dataset::IsValid(void) const
|
|||||||
|
|
||||||
for (const Tlv *cur = GetTlvsStart(); cur < end; cur = cur->GetNext())
|
for (const Tlv *cur = GetTlvsStart(); cur < end; cur = cur->GetNext())
|
||||||
{
|
{
|
||||||
VerifyOrExit((cur + 1) <= end && cur->GetNext() <= end && Tlv::IsValid(*cur), rval = false);
|
VerifyOrExit(!cur->IsExtended() && (cur + 1) <= end && cur->GetNext() <= end && Tlv::IsValid(*cur),
|
||||||
|
rval = false);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|||||||
Reference in New Issue
Block a user