diff --git a/src/core/border_router/routing_manager.cpp b/src/core/border_router/routing_manager.cpp index ef1e1ccd5..d42648192 100644 --- a/src/core/border_router/routing_manager.cpp +++ b/src/core/border_router/routing_manager.cpp @@ -340,7 +340,7 @@ void RoutingManager::RecvIcmp6Message(uint32_t aInfraIfIndex, VerifyOrExit(IsInitialized() && mIsRunning, error = kErrorDrop); VerifyOrExit(aInfraIfIndex == mInfraIfIndex, error = kErrorDrop); - VerifyOrExit(aBuffer != nullptr && aBufferLength >= sizeof(*icmp6Header), error = kErrorParse); + VerifyOrExit(aBuffer != nullptr && aBufferLength >= sizeof(Ip6::Icmp::Header), error = kErrorParse); icmp6Header = reinterpret_cast(aBuffer);