tailscale/wgengine
David Crawshaw d417be6a4b controlclinet: clone filter.MatchAllowAll
This avoids a non-obvious data race, where the JSON decoder ends
up creating do-nothing writes into global variables.

	==================
	WARNING: DATA RACE
	Write at 0x0000011e1860 by goroutine 201:
	  tailscale.com/wgengine/packet.(*IP).UnmarshalJSON()
	      /home/crawshaw/repo/corp/oss/wgengine/packet/packet.go:83 +0x2d9
	  encoding/json.(*decodeState).literalStore()
	      /home/crawshaw/go/go/src/encoding/json/decode.go:877 +0x445e
	...
	  encoding/json.Unmarshal()
	      /home/crawshaw/go/go/src/encoding/json/decode.go:107 +0x1de
	  tailscale.com/control/controlclient.(*Direct).decodeMsg()
	      /home/crawshaw/repo/corp/oss/control/controlclient/direct.go:615 +0x1ab
	  tailscale.com/control/controlclient.(*Direct).PollNetMap()
	      /home/crawshaw/repo/corp/oss/control/controlclient/direct.go:525 +0x1053
	  tailscale.com/control/controlclient.(*Client).mapRoutine()
	      /home/crawshaw/repo/corp/oss/control/controlclient/auto.go:428 +0x3a6
	Previous read at 0x0000011e1860 by goroutine 86:
	  tailscale.com/wgengine/filter.matchIPWithoutPorts()
	      /home/crawshaw/repo/corp/oss/wgengine/filter/match.go:108 +0x91
	  tailscale.com/wgengine/filter.(*Filter).runIn()
	      /home/crawshaw/repo/corp/oss/wgengine/filter/filter.go:147 +0x3c6
	  tailscale.com/wgengine/filter.(*Filter).RunIn()
	      /home/crawshaw/repo/corp/oss/wgengine/filter/filter.go:127 +0xb0
	  tailscale.com/wgengine.(*userspaceEngine).SetFilter.func1()
	      /home/crawshaw/repo/corp/oss/wgengine/userspace.go:390 +0xfc
	  github.com/tailscale/wireguard-go/device.(*Device).RoutineDecryption()
	      /home/crawshaw/repo/corp/wireguard-go/device/receive.go:295 +0xa1f

For #112

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2020-02-28 22:33:06 -05:00
..
filter controlclinet: clone filter.MatchAllowAll 2020-02-28 22:33:06 -05:00
magicsock wgengine/magicsock: reset favorite address on handshakes 2020-02-28 17:23:09 -05:00
monitor wgengine/monitor: use RTMGRP_* consts from x/sys/unix 2020-02-17 14:15:08 -08:00
packet wgengine/packet: fix minor lint errors. 2020-02-11 00:01:14 -08:00
winnet Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
faketun.go wgengine: properly clean up freebsd routes and interfaces on close 2020-02-25 16:40:10 -05:00
ifconfig_windows.go wgengine: fix build on linux/freebsd/openbsd/windows 2020-02-19 11:58:59 -05:00
router_darwin_support.go wgengine: make SetRoutesFunc less appealing to use. 2020-02-10 21:40:00 -08:00
router_darwin.go wgengine: move link monitor to be owned by the engine, not the router 2020-02-17 09:53:17 -08:00
router_default.go wgengine: simplify, change some signatures 2020-02-17 08:04:31 -08:00
router_fake.go wgengine: move link monitor to be owned by the engine, not the router 2020-02-17 09:53:17 -08:00
router_freebsd.go wgengine: properly clean up freebsd routes and interfaces on close 2020-02-25 16:40:10 -05:00
router_linux.go wgengine: resolv.conf spelling corrections 2020-02-22 06:44:56 -08:00
router_openbsd.go wgengine: add OpenBSD router DNS update handling 2020-02-20 08:03:07 -08:00
router_windows.go wgengine: move link monitor to be owned by the engine, not the router 2020-02-17 09:53:17 -08:00
rusage_nowindows.go wgengine: flesh out some docs 2020-02-12 13:37:45 -08:00
rusage_windows.go Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
rusage.go Move "logger" package to under types, now that we have it. 2020-02-14 20:23:05 -08:00
userspace.go wgengine, magicsock: fix SetPrivateKey data race 2020-02-28 11:15:07 -08:00
watchdog_test.go wgengine: simplify, change some signatures 2020-02-17 08:04:31 -08:00
watchdog.go wgengine: flesh out some docs 2020-02-12 13:37:45 -08:00
wgengine.go wgengine: update for wgcfg changes 2020-02-19 11:44:37 -05:00