tailscale/ipn/ipnlocal
Andrew Dunham 6d84f3409b ipn/ipnlocal: handle more edge cases in netmap expiry timer
We now handle the case where the NetworkMap.SelfNode has already expired
and do not return an expiry time in the past (which causes an ~infinite
loop of timers to fire).

Additionally, we now add an explicit check to ensure that the next
expiry time is never before the current local-to-the-system time, to
ensure that we don't end up in a similar situation due to clock skew.

Finally, we add more tests for this logic to ensure that we don't
regress on these edge cases.

Fixes #7193

Change-Id: Iaf8e3d83be1d133a7aab7f8d62939e508cc53f9c
Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
2023-02-06 20:32:25 -05:00
..
c2n.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
cert_js.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
cert_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
cert.go ipn/ipnlocal: add support to store certs in k8s secrets 2023-02-03 19:12:21 -08:00
dnsconfig_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
expiry_test.go ipn/ipnlocal: handle more edge cases in netmap expiry timer 2023-02-06 20:32:25 -05:00
expiry.go ipn/ipnlocal: handle more edge cases in netmap expiry timer 2023-02-06 20:32:25 -05:00
local_test.go ipn/ipnlocal: drop not required StateKey parameter 2023-01-30 17:58:55 -08:00
local.go ipn/ipnlocal: handle more edge cases in netmap expiry timer 2023-02-06 20:32:25 -05:00
loglines_test.go ipn/ipnlocal: drop not required StateKey parameter 2023-01-30 17:58:55 -08:00
network-lock_test.go ipn/ipnlocal: drop not required StateKey parameter 2023-01-30 17:58:55 -08:00
network-lock.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
peerapi_h2c.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
peerapi_macios_ext.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
peerapi_test.go ipn/ipnlocal: drop not required StateKey parameter 2023-01-30 17:58:55 -08:00
peerapi.go all: update to Go 1.20, use strings.CutPrefix/Suffix instead of our fork 2023-02-01 15:23:54 -08:00
profiles_test.go ipn/ipnlocal: drop not required StateKey parameter 2023-01-30 17:58:55 -08:00
profiles.go all: update to Go 1.20, use strings.CutPrefix/Suffix instead of our fork 2023-02-01 15:23:54 -08:00
serve_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
serve.go all: update to Go 1.20, use strings.CutPrefix/Suffix instead of our fork 2023-02-01 15:23:54 -08:00
ssh_stub.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
ssh_test.go ipn/ipnlocal: drop not required StateKey parameter 2023-01-30 17:58:55 -08:00
ssh.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
state_test.go ipn/ipnlocal: drop not required StateKey parameter 2023-01-30 17:58:55 -08:00