diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp index 74d3e4fe60d..0740e11a355 100644 --- a/src/core/net/ip6.cpp +++ b/src/core/net/ip6.cpp @@ -935,7 +935,7 @@ Error Ip6::PassToHost(OwnedPtr &aMessagePtr, Error error = kErrorNone; OwnedPtr messagePtr; - VerifyOrExit(aMessagePtr->IsLoopbackToHostAllowed(), error = kErrorNoRoute); + VerifyOrExit(aMessagePtr->IsLoopbackToHostAllowed()); VerifyOrExit(mReceiveIp6DatagramCallback.IsSet(), error = kErrorNoRoute);