mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-29 21:12:45 -08:00
tailcfg: add Node.StableTailnetID and bump capver (#21314)
Add Node.StableTailnetID for control to send the current tailnet's stable ID on the self node. Expose it as CurrentTailnet.StableID in LocalAPI status and `tailscale status --json`, and display it in `tailscale whoami`. Bump CurrentCapabilityVersion to 148. Updates #14375 RELNOTE: Show the current tailnet's stable ID in status JSON and whoami. Change-Id: I0525ff735de8113c8d124045a94e00c19a5a02e2 Signed-off-by: Andrew Dunham <[email protected]>
This commit is contained in:
1 parent
8b3b8f122e
commit
158a2476c0
12 files changed
+212
-6
No files matched your search
@@ -297,6 +297,16 @@ func (nm *NetworkMap) DomainName() string {
|
||||
return nm.Domain
|
||||
}
|
||||
|
||||
// StableTailnetID returns the stable ID of the tailnet the current node is a
|
||||
// member of, as sent by control on the self node. It returns the empty string
|
||||
// if nm is nil or nm.SelfNode is invalid.
|
||||
func (nm *NetworkMap) StableTailnetID() tailcfg.StableTailnetID {
|
||||
if nm == nil || !nm.SelfNode.Valid() {
|
||||
return ""
|
||||
}
|
||||
return nm.SelfNode.StableTailnetID()
|
||||
}
|
||||
|
||||
// TailnetDisplayName returns the admin-editable name contained in
|
||||
// NodeAttrTailnetDisplayName. If the capability is not present it
|
||||
// returns an empty string.
|
||||
|
||||
Reference in new issue
Block a user