[routing-manager] persist deprecating old prefixes in Settings (#8330)

This commit adds mechanism to save deprecating old on-link prefixes
in non-volatile `Settings`. With this, if the BR is restarted, it
will remember the old prefixes and keep deprecating them (advertising
them in emitted RA and publish them in Thread Network Data).

This commit also adds `TestSavedOnLinkPrefixes()` test case in
`test_routing_manager` to cover the behavior of the newly added
mechanism.
This commit is contained in:
Abtin Keshavarzian
2022-10-27 15:12:59 -07:00
committed by GitHub
parent b9b9c19640
commit ca8799a4b8
8 changed files with 473 additions and 21 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ extern "C" {
* @note This number versions both OpenThread platform and user APIs.
*
*/
#define OPENTHREAD_API_VERSION (255)
#define OPENTHREAD_API_VERSION (256)
/**
* @addtogroup api-instance
+1
View File
@@ -72,6 +72,7 @@ enum
OT_SETTINGS_KEY_SRP_CLIENT_INFO = 0x000c, ///< The SRP client info (selected SRP server address).
OT_SETTINGS_KEY_SRP_SERVER_INFO = 0x000d, ///< The SRP server info (UDP port).
OT_SETTINGS_KEY_BR_ULA_PREFIX = 0x000f, ///< BR ULA prefix.
OT_SETTINGS_KEY_BR_ON_LINK_PREFIXES = 0x0010, ///< BR local on-link prefixes.
// Deprecated and reserved key values:
//