From 38418aebe467a12102685af850a15686182aaa81 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Thu, 4 Apr 2024 05:57:39 +0800 Subject: [PATCH] [ip6] allow delivering RLOC/ALOC traffic to host (#9987) Filtering out traffic to/from RLOC/ALOC was added by #423 for #419. The intention was to filter out Thread's control traffic. Now we already added filtering out traffic by checking whether it is destined to a service hosted in OpenThread stack, so filtering out by RLOC/ALOC is not necessary anymore. This commit removes this filter, as a result, the core lib gets rid of the `PLATFORM_NETIF` flag. --- src/core/net/ip6.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp index 011711e4d..57968e90e 100644 --- a/src/core/net/ip6.cpp +++ b/src/core/net/ip6.cpp @@ -955,17 +955,6 @@ Error Ip6::PassToHost(OwnedPtr &aMessagePtr, if (mIsReceiveIp6FilterEnabled && aApplyFilter) { -#if !OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE - // Do not pass messages sent to an RLOC/ALOC, except - // Service Locator - - bool isLocator = Get().IsMeshLocalAddress(aMessageInfo.GetSockAddr()) && - aMessageInfo.GetSockAddr().GetIid().IsLocator(); - - VerifyOrExit(!isLocator || aMessageInfo.GetSockAddr().GetIid().IsAnycastServiceLocator(), - error = kErrorNoRoute); -#endif - switch (aIpProto) { case kProtoIcmp6: