diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 14b648b9f..39af4f86e 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -780,6 +780,9 @@ func (b *LocalBackend) onHealthChange(w *health.Warnable, us *health.UnhealthySt case <-ctx.Done(): } } else { + // If connectivity is not impacted, we know for sure we're not behind a captive portal, + // so drop any warning, and signal that we don't need captive portal detection. + b.health.SetHealthy(captivePortalWarnable) select { case b.needsCaptiveDetection <- false: case <-ctx.Done(): diff --git a/net/captivedetection/captivedetection.go b/net/captivedetection/captivedetection.go index 1b6e61e54..df0030c7d 100644 --- a/net/captivedetection/captivedetection.go +++ b/net/captivedetection/captivedetection.go @@ -97,7 +97,7 @@ func (d *Detector) detectCaptivePortalWithGOOS(ctx context.Context, netMon *netm d.logf("[v2] attempting to do captive portal detection on interface %s", ifName) res := d.detectOnInterface(ctx, i.Index, endpoints) if res { - d.logf("DetectCaptivePortal(found=true,ifName=%s)", found, ifName) + d.logf("DetectCaptivePortal(found=true,ifName=%s)", ifName) return true } }