mirror of
https://github.com/espressif/openthread.git
synced 2026-08-15 23:27:47 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user