mirror of
https://github.com/tailscale/tailscale.git
synced 2024-12-04 07:25:39 +00:00
1cd4e11b26
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>
(cherry picked from commit
|
||
---|---|---|
.. | ||
ipnlocal | ||
ipnserver | ||
ipnstate | ||
localapi | ||
policy | ||
backend.go | ||
doc.go | ||
fake_test.go | ||
handle.go | ||
message_test.go | ||
message.go | ||
prefs_clone.go | ||
prefs_test.go | ||
prefs.go | ||
store_test.go | ||
store.go |