mirror of
https://github.com/espressif/openthread.git
synced 2026-07-09 05:40:27 +00:00
64e837861f
This commit adds a new mechanism to allow border routers to request router role upgrade. A border router which provides IP connectivity (either adding an external route prefix or an on-mesh prefix with default route flag) and is acting as a REED is eligible to request a router role upgrade by sending an "Address Solicit" request to leader with status reason `BorderRouterRequest`. This reason is used when the number of active routers in the Thread mesh is above the threshold, and only if the number of existing eligible BRs (determined from the network data) that are acting as router is less than two. This mechanism allows up to two eligible border routers to request router role upgrade when the number of routers is already above the threshold. This commit also adds a new test-case `test_br_upgrade_router_role` which validates the behavior of the new mechanism.