From 5528c3d1ba2a23ccadf5202a46748ebce7794556 Mon Sep 17 00:00:00 2001 From: Alex Chan Date: Wed, 18 Nov 2026 10:02:04 +0000 Subject: [PATCH] ipn: log PostureChecking in Prefs.Pretty When prefs gets logged, we weren't recording whether the node had enabled posture checking. Not enabling this is a common cause of device posture failing, so include it here. Updates #cleanup Change-Id: I9e16c9b56ac70f51598172aa717e7e2a33c4fa7c Signed-off-by: Alex Chan --- ipn/prefs.go | 3 +++ ipn/prefs_test.go | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ipn/prefs.go b/ipn/prefs.go index ac9dd173c..aea991209 100644 --- a/ipn/prefs.go +++ b/ipn/prefs.go @@ -654,6 +654,9 @@ func (p *Prefs) pretty(goos string) string { if buildfeatures.HasAppConnectors { sb.WriteString(p.AppConnector.Pretty()) } + if p.PostureChecking { + fmt.Fprintf(&sb, "posture=%t ", p.PostureChecking) + } if buildfeatures.HasRelayServer && p.RelayServerPort != nil { fmt.Fprintf(&sb, "relayServerPort=%d ", *p.RelayServerPort) } diff --git a/ipn/prefs_test.go b/ipn/prefs_test.go index de08775cf..a0f27c25f 100644 --- a/ipn/prefs_test.go +++ b/ipn/prefs_test.go @@ -652,6 +652,11 @@ func TestPrefsPretty(t *testing.T) { "linux", `Prefs{ra=false dns=false want=false routes=[] nf=off update=off Persist=nil}`, }, + { + Prefs{PostureChecking: true}, + "linux", + `Prefs{ra=false dns=false want=false routes=[] nf=off update=off posture=true Persist=nil}`, + }, { Prefs{ NetfilterKind: "iptables",