diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp index 4ac19ec76..0941a4abf 100644 --- a/src/core/net/ip6.cpp +++ b/src/core/net/ip6.cpp @@ -1263,22 +1263,6 @@ Error Ip6::HandleDatagram(OwnedPtr aMessagePtr, bool aIsReassembled) } } -#if !OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE - if (aMessagePtr->IsOriginHostTrusted() && !aMessagePtr->IsLoopbackToHostAllowed() && (nextHeader == kProtoUdp)) - { - uint16_t destPort; - - SuccessOrExit( - error = aMessagePtr->Read(aMessagePtr->GetOffset() + Udp::Header::kDestPortFieldOffset, destPort)); - destPort = BigEndian::HostSwap16(destPort); - - if (nextHeader == kProtoUdp) - { - VerifyOrExit(Get().ShouldUsePlatformUdp(destPort), error = kErrorDrop); - } - } -#endif - #if OPENTHREAD_CONFIG_MULTI_RADIO // Since the message will be forwarded, we clear the radio // type on the message to allow the radio type for tx to be