ipn: load hostname in Start.

This prevents hostname being forced to os.Hostname despite override
when control is contacted for the first time after starting tailscaled.

Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
This commit is contained in:
Dmytro Shynkevych 2020-07-22 13:37:41 -04:00
parent de11f90d9d
commit 218de6d530
No known key found for this signature in database
GPG Key ID: FF5E2F3DAD97EA23
1 changed files with 3 additions and 0 deletions

View File

@ -353,6 +353,9 @@ func (b *LocalBackend) Start(opts Options) error {
b.serverURL = b.prefs.ControlURL
hostinfo.RoutableIPs = append(hostinfo.RoutableIPs, b.prefs.AdvertiseRoutes...)
hostinfo.RequestTags = append(hostinfo.RequestTags, b.prefs.AdvertiseTags...)
if b.prefs.Hostname != "" {
hostinfo.Hostname = b.prefs.Hostname
}
b.notify = opts.Notify
b.netMap = nil