mirror of
https://github.com/espressif/openthread.git
synced 2026-08-03 01:17:46 +00:00
[routing-manager] new mechanism for deprecating old on-link prefixes (#8315)
This commit updates how `OnLinkPrefixManager` retains and deprecates old local on-link prefixes. Instead of remembering a single old prefix, a list of old prefixes are remembered and the number of entries in the list can be configured at build-time using an OT config. If the BR is stopped, the deprecating prefixes are still remembered and the the expire timer keeps running. They are removed from the list when they expire. If the BR is started again the deprecating old prefixes are again included as PIO in the emitted RA and also published in Network Data. The changes in this commit also ensure we can correctly handle the situation where the extended PAN ID is changed to a previous value before the corresponding on-link prefix expires, i.e. when a currently deprecating prefix becomes the current local on-link prefix again. This commit also updates the unit test case validating the behavior of newly added mechanism under different situations.
This commit is contained in: