mirror of
https://github.com/espressif/openthread.git
synced 2026-07-09 05:40:27 +00:00
d6221f4d32
This commit updates the `RoutingManager` module to implement a new model for publishing routes. The new model replaces the previous model, which explicitly published all discovered routes and on-link prefixes (from processing Router Advertisements on AIL) as external routes in the Network Data. The new model simplifies this logic by publishing either a `fc00::/7` (ULA) route or a `::/0` (default) route in the Network Data, depending on the set of discovered routes and on-link prefixes, and the currently favored OMR prefix. This commit adds the `RoutePublisher` class, a nested sub-component of the `RoutingManager` class. The `RoutePublisher` class is responsible for determining the route prefix to publish and its preference. The preference of the published route is determined based on the current role of the Border Router (BR): low preference if the BR is a child, and medium preference if the BR is acting as a router. This commit also updates `test_routing_manager` unit test validating the new behavior.