control/controlclient: handle Node BlueprintID/BlueprintConfig in peerChangeDiff

peerChangeDiff iterates every Node field reflectively and panics if
it encounters one it does not know how to compare. After
tailcfg.Node grew BlueprintID and BlueprintConfig (capver 139), it
needed cases for both. Any change to either field forces a peer
re-fetch rather than producing a delta PeerChange, matching how
other identity-shaping fields like Tags and MachineAuthorized are
handled.

Updates tailscale/corp#cleanup

Signed-off-by: Kabir Sikand <[email protected]>
This commit is contained in:
Kabir Sikand committed 2026-05-15 22:21:52 +00:00
1 parent 3ac573cc85
commit 2d93449efa
1 file changed
+10
+10
View File
@@ -1047,6 +1047,16 @@ func peerChangeDiff(was tailcfg.NodeView, n *tailcfg.Node, onFalse func(string))
onFalse(field)
return nil, false
}
case "BlueprintID":
if was.BlueprintID() != n.BlueprintID {
onFalse(field)
return nil, false
}
case "BlueprintConfig":
if !was.BlueprintConfig().Equal(n.BlueprintConfig.View()) {
onFalse(field)
return nil, false
}
case "PrimaryRoutes":
if !views.SliceEqual(was.PrimaryRoutes(), views.SliceOf(n.PrimaryRoutes)) {
onFalse(field)