mirror of
https://github.com/espressif/openthread.git
synced 2026-08-09 12:17:47 +00:00
[routing-manager] stop PD if there is another prefix with higher preference in netdata (#10289)
This commit adds a new IDLE state to PdPrefixManager. PdPrefixManager enters idle state when PD is enabled and there is already a BR requesting PD prefix. When there are multiple BRs publishing PD prefix at the same time, the one with lexcial smaller prefix wins.
This commit is contained in:
@@ -4213,9 +4213,17 @@ void TestBorderRoutingProcessPlatfromGeneratedNd(void)
|
||||
AdvanceTime(1000000);
|
||||
VerifyPdOmrPrefix(raPrefix);
|
||||
|
||||
sExpectedRios.Add(newRaPrefix);
|
||||
|
||||
// When the prefix is replaced, there will be a short period when the old prefix is still in the netdata, and PD
|
||||
// manager will refuse to request the prefix.
|
||||
SendRouterAdvertToBorderRoutingProcessIcmp6Ra(
|
||||
{Pio(raPrefix, 0, 0), Pio(newRaPrefix, kValidLitime, kPreferredLifetime)});
|
||||
sExpectedRios.Add(newRaPrefix);
|
||||
// Advance a short period of time to wait for a stable PD state.
|
||||
AdvanceTime(5000);
|
||||
VerifyOrQuit(sInstance->Get<BorderRouter::RoutingManager>().GetDhcp6PdState() ==
|
||||
BorderRouter::RoutingManager::kDhcp6PdStateRunning);
|
||||
SendRouterAdvertToBorderRoutingProcessIcmp6Ra({Pio(newRaPrefix, kValidLitime, kPreferredLifetime)});
|
||||
|
||||
AdvanceTime(1000000);
|
||||
VerifyOrQuit(sExpectedRios.SawAll());
|
||||
|
||||
Reference in New Issue
Block a user