From 23135aa90d5cb0eed5298e904e794804315cf2f5 Mon Sep 17 00:00:00 2001 From: hastigondaliya <118960681+hastigondaliya@users.noreply.github.com> Date: Fri, 30 Dec 2022 10:33:00 +0530 Subject: [PATCH] [tcplp] TCP support on 15.4 (#8590) (#8593) This commit is fix to avoid dual processing on single TCP packet, added fix which restricts TCP packet to pass from opentghread stack. These changes are applicable only when openthread TCP stack is used and it is implemented under feature flag - OPENTHREAD_CONFIG_TCP_ENABLE --- src/core/net/ip6.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp index 64360f46f..41ff5d9f7 100644 --- a/src/core/net/ip6.cpp +++ b/src/core/net/ip6.cpp @@ -1062,6 +1062,15 @@ Error Ip6::ProcessReceiveCallback(Message &aMessage, break; } +#if OPENTHREAD_CONFIG_TCP_ENABLE + // Do not pass TCP message to avoid dual processing from both openthread and POSIX tcp stacks + case kProtoTcp: + { + error = kErrorNoRoute; + goto exit; + } +#endif + default: break; }