mirror of
https://github.com/espressif/openthread.git
synced 2026-08-18 08:29:52 +00:00
[network-diagnostic] REED should omit ChildTable TLV request (#2772)
This commit is contained in:
@@ -394,13 +394,19 @@ otError NetworkDiagnostic::FillRequestedTlvs(Message & aRequest,
|
||||
case NetworkDiagnosticTlv::kSupplyVoltage:
|
||||
{
|
||||
// Thread 1.1.1 Specification Section 10.11.4.3:
|
||||
// Omitted if the battery level is not measured, is unknown.
|
||||
// Omitted if the supply voltage is not measured, is unknown.
|
||||
break;
|
||||
}
|
||||
|
||||
case NetworkDiagnosticTlv::kChildTable:
|
||||
{
|
||||
SuccessOrExit(error = AppendChildTable(aResponse));
|
||||
// Thread 1.1.1 Specification Section 10.11.2.2:
|
||||
// If a Thread device is unable to supply a specific Diagnostic TLV, that TLV is omitted.
|
||||
// Here only Leader or Router may have children.
|
||||
if (netif.GetMle().GetRole() == OT_DEVICE_ROLE_LEADER || netif.GetMle().GetRole() == OT_DEVICE_ROLE_ROUTER)
|
||||
{
|
||||
SuccessOrExit(error = AppendChildTable(aResponse));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user