diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 7741b0a81..6ffc59891 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -381,6 +381,7 @@ func (b *LocalBackend) updateStatus(sb *ipnstate.StatusBuilder, extraLocked func if b.netMap != nil { s.MagicDNSSuffix = b.netMap.MagicDNSSuffix() s.CertDomains = append([]string(nil), b.netMap.DNS.CertDomains...) + s.TailnetName = b.netMap.Domain } }) sb.MutateSelfStatus(func(ss *ipnstate.PeerStatus) { diff --git a/ipn/ipnstate/ipnstate.go b/ipn/ipnstate/ipnstate.go index 518847582..fd77875cb 100644 --- a/ipn/ipnstate/ipnstate.go +++ b/ipn/ipnstate/ipnstate.go @@ -33,6 +33,10 @@ type Status struct { // "Starting", "Running". BackendState string + // TailnetName is the name of the network that's currently in + // use. + TailnetName string + AuthURL string // current URL provided by control to authorize client TailscaleIPs []netaddr.IP // Tailscale IP(s) assigned to this node Self *PeerStatus diff --git a/types/netmap/netmap.go b/types/netmap/netmap.go index 9cf90f28c..0507e3eb9 100644 --- a/types/netmap/netmap.go +++ b/types/netmap/netmap.go @@ -62,7 +62,9 @@ type NetworkMap struct { // ACLs - User tailcfg.UserID + User tailcfg.UserID + + // Domain is the current Tailnet name. Domain string UserProfiles map[tailcfg.UserID]tailcfg.UserProfile