mirror of
https://github.com/espressif/openthread.git
synced 2026-08-15 15:17:46 +00:00
[nat64] schedule evaluation of policy when Nat64PrefixManager::Discover() fails (#11654)
Previously we were relying on the platform to call `otPlatInfraIfDiscoverNat64PrefixDone` to trigger the evaluation of NAT64 prefix. Since https://github.com/openthread/openthread/pull/11481, we're no longer doing proactive DNS-based prefix discoveries and it never calls the callback `otPlatInfraIfDiscoverNat64PrefixDone`. That means NAT64 evaluation can only happen when `RoutingManager::EvaluateRoutingPolicy` is triggered, which can cause a at most 3-minute delay (`kRaBeaconInterval`), between enabling NAT64 feature and the feature starts to work. This commit triggers the evaluation of routing policy when `Nat64PrefixManager::Discover()` fails to ensure the feature starts to work on time.
This commit is contained in:
@@ -4145,6 +4145,7 @@ void RoutingManager::Nat64PrefixManager::Discover(void)
|
||||
else
|
||||
{
|
||||
LogWarn("Failed to discover infraif NAT64 prefix: %s", ErrorToString(error));
|
||||
Get<RoutingManager>().ScheduleRoutingPolicyEvaluation(kAfterRandomDelay);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user