tailscale/control/controlclient
David Crawshaw b462954c20 controlclient: preserve NetInfo on Hostinfo update
We have two separate functions, SetHostinfo and SetNetInfo, called by
different systems at different times.

But we store the NetInfo object inside the Hostinfo object.
Usually this is fine if we:

	1. SetHostinfo
	2. SetNetInfo

But it is possible to:

	1. SetNetInfo  -- controlclient now knows about our home DERP
	2. SetHostinfo -- NetInfo is now nil

The result is controlclient loses track of our PreferredDERP.
In our end-to-end test, this appears as the client being connected to a
test DERP server, but the server never receiving the information.

This is visible in the logs of the end-to-end test by searching for the
string "[v1] HostInfo" and seeing that even though a DERP home is well
established before the log line, there is no NetInfo to speak of.

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2022-06-16 16:44:50 +10:00
..
auto.go cmd/tailscale: surface authentication errors in status.Health (#4748) 2022-06-03 10:52:07 -07:00
client.go ssh/tailssh, ipnlocal, controlclient: fetch next SSHAction from network 2022-03-10 13:41:08 -08:00
controlclient_test.go control/controlclient: store netinfo and hostinfo separately 2022-05-03 15:33:01 -07:00
debug_test.go control/controlclient: don't use regexp in goroutine stack scrubbing 2021-07-22 13:18:05 -07:00
debug.go control/controlclient: grow goroutine debug buffer as needed 2021-07-22 13:18:05 -07:00
direct_test.go net/tsdial: add SystemDial as a wrapper on netns.Dial 2022-04-27 12:02:36 -07:00
direct.go controlclient: preserve NetInfo on Hostinfo update 2022-06-16 16:44:50 +10:00
map_test.go control/controlclient: stop using wgkey. 2021-10-28 14:22:51 -07:00
map.go control/controlclient, ipn/ipnlocal, tailcfg: add MapResponse.PopBrowserURL 2022-03-22 09:37:00 -07:00
noise_test.go control/controlbase: make the protocol version number selectable. 2022-04-07 13:25:28 -07:00
noise.go net/tsdial: add SystemDial as a wrapper on netns.Dial 2022-04-27 12:02:36 -07:00
sign_supported_test.go go.mod: update to latest certstore 2022-03-16 16:10:29 -07:00
sign_supported.go go.mod: update to latest certstore 2022-03-16 16:10:29 -07:00
sign_unsupported.go go.mod: update to latest certstore 2022-03-16 16:10:29 -07:00
sign.go control/controlclient: update machine certificate signature version 2021-09-17 17:43:06 -04:00
status.go control/controlclient: store netinfo and hostinfo separately 2022-05-03 15:33:01 -07:00