From 06fa3075da01a1689d55c3e69c1a923e216b68af Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Wed, 23 Sep 2026 08:52:20 +0000 Subject: [PATCH] hscontrol: replace tailscale line refs with doc links Line numbers drift on every upstream bump. --- hscontrol/app.go | 3 +-- hscontrol/mapper/builder.go | 3 ++- hscontrol/policy/v2/tailnet_state_caps.go | 16 +++++++++------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/hscontrol/app.go b/hscontrol/app.go index b4440d85..26cd1bba 100644 --- a/hscontrol/app.go +++ b/hscontrol/app.go @@ -222,8 +222,7 @@ func NewHeadscale(cfg *types.Config) (*Headscale, error) { // DNS routes vanish, taking the resolver with them for ~6 min // until the next route-changing netmap. Empty slice survives // Clone and carries the same "resolve locally" semantics - // (tailscale.com/ipn/ipnlocal/node_backend.go:869 documents the - // empty-resolver Routes form for Issue 2706). + // ([tailcfg.DNSConfig.Routes] documents the empty-resolver form). app.cfg.TailcfgDNSConfig.Routes[d.WithoutTrailingDot()] = []*dnstype.Resolver{} } } diff --git a/hscontrol/mapper/builder.go b/hscontrol/mapper/builder.go index 8a71f3ff..1417dc84 100644 --- a/hscontrol/mapper/builder.go +++ b/hscontrol/mapper/builder.go @@ -302,7 +302,8 @@ func (b *MapResponseBuilder) buildTailPeers(peers views.Slice[types.NodeView]) ( // [tailcfg.Node.CapMap] on a peer carries the small set of // caps the Tailscale client reads from the peer view rather // than the self view (suggest-exit-node, dns-subdomain-resolve - // — see ipn/ipnlocal/local.go:7534 and node_backend.go:745). + // — see [tailcfg.NodeAttrSuggestExitNode] and + // [tailcfg.NodeAttrDNSSubdomainResolve]). // The Tailscale-hosted control plane stamps these only when // the peer satisfies the cap's emission condition; every other // cap stays off the peer view, leaving CapMap empty for most diff --git a/hscontrol/policy/v2/tailnet_state_caps.go b/hscontrol/policy/v2/tailnet_state_caps.go index 575efb83..373485d8 100644 --- a/hscontrol/policy/v2/tailnet_state_caps.go +++ b/hscontrol/policy/v2/tailnet_state_caps.go @@ -93,20 +93,21 @@ var unmodelledTailnetStateCaps = []nodecap.Cap{ // [tailcfg.CapabilityTailnetLock]: tailnet-lock signs node keys // with a tailnet-wide signing key so peers can detect silent - // re-keying by the control plane. Client reads at - // ipn/ipnlocal/local.go:1752 (b.capTailnetLock). Headscale has no - // tailnet-lock implementation. + // re-keying by the control plane. Client gates + // [tailscale.com/ipn/ipnlocal.LocalBackend.NetworkLockStatus] on it. + // Headscale has no tailnet-lock implementation. nodecap.TailnetLock, // [tailcfg.NodeAttrServiceHost]: marks a node as approved to host - // VIP services (Tailscale Services). Client reads via - // UnmarshalNodeCapViewJSON at ipn/ipnlocal/local.go:2704. + // VIP services (Tailscale Services). Client decodes it via + // [tailcfg.UnmarshalNodeCapViewJSON] into [tailcfg.ServiceIPMappings]. // Headscale does not implement Tailscale Services. nodecap.ServiceHost, // [tailcfg.NodeAttrStoreAppCRoutes]: tells an app-connector node // to persist learned routes across restarts. Client reads via - // controlknobs:148. Headscale does not implement app connectors. + // [tailscale.com/control/controlknobs.Knobs.UpdateFromNodeAttributes]. Headscale does not implement app + // connectors. nodecap.StoreAppCRoutes, // [tailcfg.CapabilityWarnFunnelNoHTTPS]: deprecated in Tailscale @@ -140,7 +141,8 @@ var unmodelledTailnetStateCaps = []nodecap.Cap{ // [tailcfg.NodeAttrProbeUDPLifetime]: tunes magicsock's UDP // path-lifetime probe behavior. Internal performance knob; not - // policy-driven. Client reads via controlknobs:147. + // policy-driven. Client reads via + // [tailscale.com/control/controlknobs.Knobs.UpdateFromNodeAttributes]. nodecap.ProbeUDPLifetime, // [tailcfg.NodeAttrSSHBehaviorV1]: configures the embedded SSH