tailscale/ipn/ipnlocal
Brad Fitzpatrick ecfb2639cc ipn/ipnlocal: avoid initPeerAPIListener crash on certain concurrent actions
We were crashing on in initPeerAPIListener when called from
authReconfig when b.netMap is nil. But authReconfig already returns
before the call to initPeerAPIListener when b.netMap is nil, but it
releases the b.mu mutex before calling initPeerAPIListener which
reacquires it and assumes it's still nil.

The only thing that can be setting it to nil is setNetMapLocked, which
is called by ResetForClientDisconnect, Logout/logout, or Start, all of
which can happen during an authReconfig.

So be more defensive.

Fixes #1996

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-06-03 09:46:28 -07:00
..
local_test.go all: adapt to opaque netaddr types 2021-05-16 14:52:00 -07:00
local.go ipn/ipnlocal: avoid initPeerAPIListener crash on certain concurrent actions 2021-06-03 09:46:28 -07:00
loglines_test.go types/logger: add key grinder stats lines to rate-limiting exemption list 2021-05-05 08:25:15 -07:00
peerapi_macios_ext.go net/{interfaces,netns}: change which build tag means mac/ios Network/System Extension 2021-06-03 08:29:22 -07:00
peerapi_test.go ipn/ipnlocal: use delete marker files to work around Windows delete problems 2021-04-26 10:59:25 -07:00
peerapi.go all: adapt to opaque netaddr types 2021-05-16 14:52:00 -07:00
state_test.go ipnlocal: in Start() fast path, don't forget to send Prefs. 2021-05-31 14:53:49 -04:00