tailscale/wgengine
Maisem Ali 6fecc16c3b ipn/ipnlocal: do not process old status messages received out of order
When `setWgengineStatus` is invoked concurrently from multiple
goroutines, it is possible that the call invoked with a newer status is
processed before a call with an older status. e.g. a status that has
endpoints might be followed by a status without endpoints. This causes
unnecessary work in the engine and can result in packet loss.

This patch adds an `AsOf time.Time` field to the status to specifiy when the
status was calculated, which later allows `setWgengineStatus` to ignore
any status messages it receives that are older than the one it has
already processed.

Updates tailscale/corp#2579

Signed-off-by: Maisem Ali <maisem@tailscale.com>
2022-03-26 20:23:50 -07:00
..
bench types/netmap: use key.NodePublic instead of tailcfg.NodeKey. 2021-11-01 17:07:40 -07:00
filter all: use strings.Cut even more 2022-03-19 13:02:38 -07:00
magicsock all: use strings.Cut even more 2022-03-19 13:02:38 -07:00
monitor all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
netstack wgengine: inject packetbuffers rather than bytes (#4220) 2022-03-21 14:58:43 -07:00
router all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
wgcfg all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
wglog all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
winnet all: gofmt -w -s (simplify) tests 2021-12-15 08:43:41 -08:00
mem_ios.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
pendopen.go envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 2022-01-24 11:51:23 -08:00
userspace_ext_test.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
userspace_test.go all: gofmt -w -s (simplify) tests 2021-12-15 08:43:41 -08:00
userspace.go ipn/ipnlocal: do not process old status messages received out of order 2022-03-26 20:23:50 -07:00
watchdog_test.go all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
watchdog.go all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
wgengine.go ipn/ipnlocal: do not process old status messages received out of order 2022-03-26 20:23:50 -07:00