[mle] restrict SetPreferredRouterId() API to REF_DEVICE (#12973)

This commit restricts the API to set a preferred router ID under
`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`. This feature is intended
for testing and therefore be excluded from standard builds to ensure
compliance with the Thread Specification.
This commit is contained in:
Abtin Keshavarzian
2026-04-27 17:04:20 -07:00
committed by GitHub
parent 71d43b5cca
commit 1413778a09
10 changed files with 25 additions and 9 deletions
+2
View File
@@ -3296,6 +3296,7 @@ exit:
return;
}
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
Error Mle::SetPreferredRouterId(uint8_t aRouterId)
{
Error error = kErrorNone;
@@ -3307,6 +3308,7 @@ Error Mle::SetPreferredRouterId(uint8_t aRouterId)
exit:
return error;
}
#endif
void Mle::SetRouterId(uint8_t aRouterId)
{