mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 11:47:46 +00:00
[network-diagnostics] use the child timeout directly (#4136)
This commit changes the `NetworkDiagnostic::FillRequestedTlvs()` to directly use the child timeout value in appended `TimeoutTlv`. This addresses an issue where a user-specified long data poll interval could cause the timeout TLV in diags response to be set higher than actual child's timeout value.
This commit is contained in:
committed by
Jonathan Hui
parent
2d3fd3b047
commit
a11dafb686
@@ -336,7 +336,7 @@ otError NetworkDiagnostic::FillRequestedTlvs(Message & aRequest,
|
||||
{
|
||||
TimeoutTlv tlv;
|
||||
tlv.Init();
|
||||
tlv.SetTimeout(TimerMilli::MsecToSec(Get<DataPollSender>().GetKeepAlivePollPeriod()));
|
||||
tlv.SetTimeout(Get<Mle::MleRouter>().GetTimeout());
|
||||
SuccessOrExit(error = aResponse.AppendTlv(tlv));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user