From 486cc9393c26ba3ab97d4de59052c58d0d0f2c2b Mon Sep 17 00:00:00 2001 From: Maisem Ali Date: Fri, 5 Aug 2022 10:32:11 -0700 Subject: [PATCH] ipn/ipnlocal: fix log about local IPs when using exit nodes Signed-off-by: Maisem Ali --- ipn/ipnlocal/local.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index af085045f..53aebc0f9 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -2792,14 +2792,12 @@ func (b *LocalBackend) routerConfig(cfg *wgcfg.Config, prefs *ipn.Prefs, oneCGNA rs.LocalRoutes = internalIPs // unconditionally allow access to guest VM networks if prefs.ExitNodeAllowLANAccess { rs.LocalRoutes = append(rs.LocalRoutes, externalIPs...) - if len(externalIPs) != 0 { - b.logf("allowing exit node access to internal IPs: %v", internalIPs) - } } else { // Explicitly add routes to the local network so that we do not // leak any traffic. rs.Routes = append(rs.Routes, externalIPs...) } + b.logf("allowing exit node access to local IPs: %v", rs.LocalRoutes) } }