hostinfo: add SetOSVersion like SetDeviceModel, deprecate ipn.Prefs way

Turns out the iOS client has been only sending the OS version it first
started at. This whole hostinfo-via-prefs mechanism was never a good idea.
Start removing it.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-10-05 13:23:47 -07:00
committed by Brad Fitzpatrick
parent 98b3fa78aa
commit 81269fad28
3 changed files with 27 additions and 9 deletions

View File

@@ -2275,7 +2275,7 @@ func applyPrefsToHostinfo(hi *tailcfg.Hostinfo, prefs *ipn.Prefs) {
if h := prefs.Hostname; h != "" {
hi.Hostname = h
}
if v := prefs.OSVersion; v != "" {
if v := prefs.OSVersion; v != "" && hi.OSVersion == "" {
hi.OSVersion = v
// The Android app annotates when Google Play Services