[routing-manager] PublishExternalRoute() to return success on kErrorAlready (#7715)

This commit changes `RoutingManager::PublishExternalRoute()` method
to return `kErrorAlready` as `kErrorNone` (i.e., if the prefix to be
published was previously published). This commit keeps the logging
the same (i.e. we still log on `Already` error so we can see when/if
this happens).
This commit is contained in:
Abtin Keshavarzian
2022-05-18 11:45:23 -07:00
committed by Jonathan Hui
parent 0fdbfbe613
commit d3a6268149
+1 -1
View File
@@ -565,7 +565,7 @@ Error RoutingManager::PublishExternalRoute(const Ip6::Prefix &aPrefix, RoutePref
LogWarn("Failed to publish external route %s: %s", aPrefix.ToString().AsCString(), ErrorToString(error));
}
return error;
return (error == kErrorAlready) ? kErrorNone : error;
}
void RoutingManager::UnpublishExternalRoute(const Ip6::Prefix &aPrefix)