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 <alexc@tailscale.com>
This commit is contained in:
Alex Chan authored and Alex Chan committed 2026-11-18 14:58:51 +00:00
1 parent 31854730c0
commit 5528c3d1ba
2 files changed
+8

No files matched your search

+3
View File
@@ -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)
}
+5
View File
@@ -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",