diff --git a/src/core/api/border_routing_api.cpp b/src/core/api/border_routing_api.cpp index 388d1f29f..306c9c282 100644 --- a/src/core/api/border_routing_api.cpp +++ b/src/core/api/border_routing_api.cpp @@ -221,8 +221,7 @@ void otBorderRoutingDhcp6PdSetEnabled(otInstance *aInstance, bool aEnabled) otBorderRoutingDhcp6PdState otBorderRoutingDhcp6PdGetState(otInstance *aInstance) { - return static_cast( - AsCoreType(aInstance).Get().GetDhcp6PdState()); + return MapEnum(AsCoreType(aInstance).Get().GetDhcp6PdState()); } void otBorderRoutingDhcp6PdSetRequestCallback(otInstance *aInstance, diff --git a/src/core/border_router/routing_manager.cpp b/src/core/border_router/routing_manager.cpp index da6cba55f..3461f429f 100644 --- a/src/core/border_router/routing_manager.cpp +++ b/src/core/border_router/routing_manager.cpp @@ -4034,7 +4034,7 @@ void RoutingManager::PdPrefixManager::EvaluateStateChange(Dhcp6PdState aOldState // manager will refuse to request the prefix. // TODO: Either update the comment for the state callback or add a random delay when notifing the upper layer for // state change. - mStateCallback.InvokeIfSet(static_cast(newState)); + mStateCallback.InvokeIfSet(MapEnum(newState)); exit: return; diff --git a/src/core/border_router/routing_manager.hpp b/src/core/border_router/routing_manager.hpp index 4d275cda5..9b98032be 100644 --- a/src/core/border_router/routing_manager.hpp +++ b/src/core/border_router/routing_manager.hpp @@ -1640,6 +1640,7 @@ template <> void RoutingManager::RxRaTracker::Entry