diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp index 0941a4abf..1ca4f4b0f 100644 --- a/src/core/net/ip6.cpp +++ b/src/core/net/ip6.cpp @@ -1032,12 +1032,7 @@ Error Ip6::PassToHost(OwnedPtr &aMessagePtr, #endif #if OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE - { - Header header; - - IgnoreError(header.ParseFrom(*messagePtr)); - UpdateBorderRoutingCounters(header, messagePtr->GetLength(), /* aIsInbound */ false); - } + UpdateBorderRoutingCounters(aHeader, messagePtr->GetLength(), /* aIsInbound */ false); #endif #if OPENTHREAD_CONFIG_IP6_RESTRICT_FORWARDING_LARGER_SCOPE_MCAST_WITH_LOCAL_SRC