From 61d7ff378792135cd8e442a3aac65867826008a3 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 7 Jul 2022 15:50:26 -0400 Subject: [PATCH] on apple write packets back to interface when it is for us because that does not have a route spec for the interace ip on loopback as apple finds having sensible defaults bothersome internally --- llarp/handlers/tun.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/llarp/handlers/tun.cpp b/llarp/handlers/tun.cpp index d019bc260..e14e37c06 100644 --- a/llarp/handlers/tun.cpp +++ b/llarp/handlers/tun.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -1066,6 +1067,15 @@ namespace llarp src = pkt.srcv6(); } + if constexpr (llarp::platform::is_apple) + { + if (dst == m_OurIP) + { + HandleWriteIPPacket(pkt.ConstBuffer(), src, dst, 0); + return; + } + } + if (m_state->m_ExitEnabled) { dst = net::ExpandV4(net::TruncateV6(dst));