ipn/ipnlocal: only send AllowsUpdate if clientupdate feature is linked in

Like the earlier RemoteConfig change, gate Hostinfo.AllowsUpdate on
feature.IsRegistered("clientupdate") in addition to the
buildfeatures.HasClientUpdate build-tag const. tsnet binaries don't
import feature/clientupdate even though ts_omit_clientupdate isn't
set, so they shouldn't tell control they can be remotely updated.

Add the previously missing feature.Register call to
feature/clientupdate, document the binary-support requirement on
tailcfg.Hostinfo.AllowsUpdate, and make tsnet's dep test verify it
doesn't depend on feature/clientupdate.

Updates #12614

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I526ef11f2a4141f5fce161b1f77263324014b5c4
This commit is contained in:
Brad Fitzpatrick
2026-07-09 19:08:05 -07:00
committed by Brad Fitzpatrick
parent ac84eb4900
commit b3d0ebcca3
5 changed files with 18 additions and 5 deletions
+9 -3
View File
@@ -913,9 +913,15 @@ type Hostinfo struct {
// away, even if it's disabled most of the time. As an optimization, this is
// only sent if IngressEnabled is false, as IngressEnabled implies that this
// option is true.
WireIngress bool `json:",omitzero"`
IngressEnabled bool `json:",omitzero"` // if the node has any funnel endpoint enabled
AllowsUpdate bool `json:",omitzero"` // indicates that the node has opted-in to admin-console-drive remote updates
WireIngress bool `json:",omitzero"`
IngressEnabled bool `json:",omitzero"` // if the node has any funnel endpoint enabled
// AllowsUpdate reports that the node has opted in to
// admin-console-driven remote updates and that the running binary
// includes client update support (the feature/clientupdate package,
// which tsnet apps don't include).
AllowsUpdate bool `json:",omitzero"`
Machine string `json:",omitzero"` // the current host's machine type (uname -m)
GoArch string `json:",omitzero"` // GOARCH value (of the built binary)
GoArchVar string `json:",omitzero"` // GOARM, GOAMD64, etc (of the built binary)
+4 -1
View File
@@ -570,7 +570,10 @@ func (v HostinfoView) WireIngress() bool { return v.ж.WireIngress }
// if the node has any funnel endpoint enabled
func (v HostinfoView) IngressEnabled() bool { return v.ж.IngressEnabled }
// indicates that the node has opted-in to admin-console-drive remote updates
// AllowsUpdate reports that the node has opted in to
// admin-console-driven remote updates and that the running binary
// includes client update support (the feature/clientupdate package,
// which tsnet apps don't include).
func (v HostinfoView) AllowsUpdate() bool { return v.ж.AllowsUpdate }
// the current host's machine type (uname -m)