You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
4 years ago
..
local.go ipn/ipnlocal: avoid initPeerAPIListener crash on certain concurrent actions 4 years ago
local_test.go all: adapt to opaque netaddr types 4 years ago
loglines_test.go types/logger: add key grinder stats lines to rate-limiting exemption list 4 years ago
peerapi.go all: adapt to opaque netaddr types 4 years ago
peerapi_macios_ext.go net/{interfaces,netns}: change which build tag means mac/ios Network/System Extension 4 years ago
peerapi_test.go ipn/ipnlocal: use delete marker files to work around Windows delete problems 4 years ago
state_test.go ipnlocal: in Start() fast path, don't forget to send Prefs. 4 years ago