[multi-ail-detector] allow detector to run independently of Border Routing (#12078)

This commit updates the Multi-AIL Detection feature to operate
independently of the Border Routing Manager. This fundamental change
allows the detector to be enabled/disabled on its own, rather than
being tied to the Border Routing Manager's state.

This change also moves the Multi-AIL detection API into a separate
`openthread/multi_ail_detection.h` header and introduces new APIs to
control the detector independently. Corresponding CLI commands are
also added.

The `test-505-multi-ail-detection.py` is also updated to validate
this new independent behavior. In particular that a device that is
not enabled to act as a BR can independently run multi-AIL detection
and determine whether, if it becomes a BR, it will cause multi-AIL
issues.
This commit is contained in:
Abtin Keshavarzian
2025-11-12 22:09:42 +01:00
committed by GitHub
parent 61e43cffb9
commit eb51d4be51
22 changed files with 541 additions and 101 deletions
+12
View File
@@ -1416,6 +1416,18 @@ void InitTest(bool aEnablBorderRouting = false, bool aAfterReset = false)
SuccessOrQuit(otIp6SetEnabled(sInstance, true));
SuccessOrQuit(otThreadSetEnabled(sInstance, true));
#if OPENTHREAD_CONFIG_BORDER_ROUTING_MULTI_AIL_DETECTION_ENABLE
// We explicitly disable the multi-AIL detector to prevent
// interference with the tests. The detector enables
// `RxRaTracker` and keeps it enabled even when Border Routing is
// disabled, which keeps prefix entries in the heap and can
// invalidate the heap allocation checks. It may also mess up the
// expected timing of RS (Router Solicitation) messages (starting
// the `RxRaTracker` early).
otBorderRoutingSetMultiAilDetectionEnabled(sInstance, false);
#endif
SuccessOrQuit(otBorderRoutingSetEnabled(sInstance, aEnablBorderRouting));
// Reset all test flags