mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
types/netmap: remove redundant Netmap.Hostinfo
It was in SelfNode.Hostinfo anyway. The redundant copy was just costing us an allocation per netmap (a Hostinfo.Clone). Updates #1909 Change-Id: Ifac568aa5f8054d9419828489442a0f4559bc099 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
50b558de74
commit
947def7688
@@ -704,7 +704,9 @@ func (b *LocalBackend) updateStatus(sb *ipnstate.StatusBuilder, extraLocked func
|
||||
ss.Online = health.GetInPollNetMap()
|
||||
if b.netMap != nil {
|
||||
ss.InNetworkMap = true
|
||||
ss.HostName = b.netMap.Hostinfo.Hostname
|
||||
if hi := b.netMap.SelfNode.Hostinfo(); hi.Valid() {
|
||||
ss.HostName = hi.Hostname()
|
||||
}
|
||||
ss.DNSName = b.netMap.Name
|
||||
ss.UserID = b.netMap.User()
|
||||
if sn := b.netMap.SelfNode; sn.Valid() {
|
||||
|
Reference in New Issue
Block a user