[rx-ra-tracker] add state to track initial router discovery process (#12080)

Adds a new state, `mInitialDiscoveryFinished`, to `RxRaTracker` to
track the completion of the initial router discovery (RS transmission)
process. A new method, `IsInitialRouterDiscoveryFinished()`, exposes
this state.

This new method replaces `IsRsTxInProgress()`, which previously
checked if any RS transmission was ongoing. The new model ensures
the initial discovery is tracked only once after `RxRaTracker`
starts, rather than every time RS messages are sent (e.g., due to
stale timer expiration).

Additionally, the `RoutingManager` now checks this state and ignores
incoming RS messages until the initial router discovery is complete.
This prevents the BR from replying to its own RS messages or sending
an RA prematurely with incomplete information before all routers
are discovered and decision factors are determined.
This commit is contained in:
Abtin Keshavarzian
2025-10-31 07:14:34 -07:00
committed by GitHub
parent 9190f961f6
commit 537d790c0d
4 changed files with 23 additions and 11 deletions
+1
View File
@@ -318,6 +318,7 @@ otError otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex,
case Ip6::Icmp::Header::kTypeRouterSolicit:
Log(" Router Solicit message");
sRsEmitted = true;
otPlatInfraIfRecvIcmp6Nd(sInstance, kInfraIfIndex, &sInfraIfAddress, aBuffer, aBufferLength);
break;
case Ip6::Icmp::Header::kTypeRouterAdvert: