[bbr] handle role changes directly in BackboneRouter::Local (#13112)

This commit updates `BackboneRouter::Local` to receive role change
events directly from the `Notifier`. Previously, `Bbr::Local` was
indirectly relying on `BackboneRouter::Leader` to emit events even
when the PBBR configuration had not changed (e.g., during role
transitions).

The previous design was fragile and created an unnecessary dependency.
`Bbr::Local` now independently tracks role changes to ensure it
correctly evaluates its own status (e.g., deciding whether to
register as the Primary BBR).
This commit is contained in:
Abtin Keshavarzian
2026-05-18 22:02:40 -07:00
committed by Jonathan Hui
parent c5efa406c2
commit 9137b82dbe
3 changed files with 19 additions and 0 deletions
+3
View File
@@ -104,6 +104,9 @@ void Notifier::EmitEvents(void)
#if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2)
Get<BackboneRouter::Leader>().HandleNotifierEvents(events);
#endif
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
Get<BackboneRouter::Local>().HandleNotifierEvents(events);
#endif
#if OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE
Get<Dhcp6::Server>().HandleNotifierEvents(events);
#endif