From 66ad35c04e25f47445e6cd9df7ef8f5edd95a960 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 14 Oct 2021 13:09:06 -0700 Subject: [PATCH] ipn/ipnlocal: don't try to block localhost traffic when using exit nodes Signed-off-by: Brad Fitzpatrick (cherry picked from commit ddf3394b408b1dcc9d890234d5f24d5551ff4f0d) --- ipn/ipnlocal/local.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 4a4cb0b6a..8cc5a2a14 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -1029,6 +1029,10 @@ func internalAndExternalInterfaces() (internal, external []netaddr.IPPrefix, err if pfx.IsSingleIP() { return } + if iface.IsLoopback() { + internal = append(internal, pfx) + return + } if runtime.GOOS == "windows" { // Windows Hyper-V prefixes all MAC addresses with 00:15:5d. // https://docs.microsoft.com/en-us/troubleshoot/windows-server/virtualization/default-limit-256-dynamic-mac-addresses