ipn/ipnlocal: add a C2N endpoint for fetching a netmap

For debugging purposes, add a new C2N endpoint returning the current
netmap. Optionally, coordination server can send a new "candidate" map
response, which the client will generate a separate netmap for.
Coordination server can later compare two netmaps, detecting unexpected
changes to the client state.

Updates tailscale/corp#32095

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov
2025-08-13 15:00:35 +01:00
committed by Anton Tolchanov
parent 394718a4ca
commit 4a04161828
9 changed files with 506 additions and 9 deletions

View File

@@ -171,7 +171,8 @@ type CapabilityVersion int
// - 124: 2025-08-08: removed NodeAttrDisableMagicSockCryptoRouting support, crypto routing is now mandatory
// - 125: 2025-08-11: dnstype.Resolver adds UseWithExitNode field.
// - 126: 2025-09-17: Client uses seamless key renewal unless disabled by control (tailscale/corp#31479)
const CurrentCapabilityVersion CapabilityVersion = 126
// - 127: 2025-09-19: can handle C2N /debug/netmap.
const CurrentCapabilityVersion CapabilityVersion = 127
// ID is an integer ID for a user, node, or login allocated by the
// control plane.