From bc54d67ed892ba17213d47cab59ac1437aa001ce Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Fri, 21 Feb 2025 21:48:34 -0800 Subject: [PATCH] [mle] clamp child timeout to min/max range (#11278) This commit updates `SetTimeout()` to ensure the child timeout remains within the minimum and maximum allowed values (per the specification, the maximum value of 8 hours is used). These limits are also enforced when the parent requests a different timeout value in an MLE Child Update Response to the child's request. --- src/core/common/time.hpp | 17 +++++++++++------ src/core/thread/mle.cpp | 17 ++++++++++++----- src/core/thread/mle.hpp | 9 ++++++++- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/core/common/time.hpp b/src/core/common/time.hpp index 2119ec83b..70722185b 100644 --- a/src/core/common/time.hpp +++ b/src/core/common/time.hpp @@ -59,12 +59,17 @@ namespace ot { class Time : public Unequatable