From c07bf57eba8301b4c74895b52319f7eb7b6d9f53 Mon Sep 17 00:00:00 2001 From: Andrew Lytvynov Date: Fri, 5 Jun 2026 14:00:07 -0700 Subject: [PATCH] cmd/tailscaled: only warn about unsupported attestation when enabled (#20028) We don't need to log if the policy doesn't actually say that hardware attestation must be enabled. Updates #cleanup Signed-off-by: Andrew Lytvynov --- cmd/tailscaled/tailscaled.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/tailscaled/tailscaled.go b/cmd/tailscaled/tailscaled.go index ef2b5ed1d..44341ea3c 100644 --- a/cmd/tailscaled/tailscaled.go +++ b/cmd/tailscaled/tailscaled.go @@ -923,7 +923,9 @@ func handleTPMFlags() { case !args.hardwareAttestation.set: policyHWAttestation, _ := policyclient.Get().GetBoolean(pkey.HardwareAttestation, false) if err := canUseHardwareAttestation(); err != nil { - log.Printf("[unexpected] policy requires hardware attestation, but device does not support it: %v", err) + if policyHWAttestation { + log.Printf("[unexpected] policy requires hardware attestation, but device does not support it: %v", err) + } args.hardwareAttestation.v = false } else { args.hardwareAttestation.v = policyHWAttestation