tailcfg, localapi: plumb device token to server

Updates tailscale/corp#8940

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
David Crawshaw
2023-01-29 14:04:40 -08:00
committed by David Crawshaw
parent 38b32be926
commit 8cf2805cca
9 changed files with 130 additions and 27 deletions

View File

@@ -1811,6 +1811,21 @@ func (b *LocalBackend) readPoller() {
}
}
// ResendHostinfoIfNeeded is called to recompute the Hostinfo and send
// the new version to the control server.
func (b *LocalBackend) ResendHostinfoIfNeeded() {
hi := hostinfo.New()
b.mu.Lock()
if b.hostinfo != nil {
hi.Services = b.hostinfo.Services
}
b.hostinfo = hi
b.mu.Unlock()
b.doSetHostinfoFilterServices(hi)
}
// WatchNotifications subscribes to the ipn.Notify message bus notification
// messages.
//