mirror of
https://github.com/espressif/openthread.git
synced 2026-07-09 05:40:27 +00:00
5cfbcfcbf4
This commit updates `NetworkData::Publisher` so that a call to `PublishOnMeshPrefix()` or `PublishExternalRoute()` replaces a previous request for the same prefix. In particular, if the new call only changes the flags (e.g., preference level) and the prefix is already added in the Network Data, the change to flags is immediately reflected in the Network Data. This ensures that existing entries in the Network Data are not abruptly removed. Note that a change in the preference level can potentially later cause the entry to be removed from the Network Data after determining there are other nodes that are publishing the same prefix with the same or higher preference. This commit also updates `test_netdata_publisher.py` to test the newly added behavior.