From 8ee1cb6156840b09c60fcba2d9f8ee294d6d75f1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 24 Feb 2021 21:15:14 -0800 Subject: [PATCH] ipn/ipnlocal: mark findExitNodeID as requiring mutex. Signed-off-by: David Anderson --- ipn/ipnlocal/local.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index e3cd5a27e..c9a4ebd2a 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -310,7 +310,7 @@ func (b *LocalBackend) setClientStatus(st controlclient.Status) { prefsChanged = true } if st.NetMap != nil { - if b.findExitNodeID(st.NetMap) { + if b.findExitNodeIDLocked(st.NetMap) { prefsChanged = true } b.setNetMapLocked(st.NetMap) @@ -371,9 +371,9 @@ func (b *LocalBackend) setClientStatus(st controlclient.Status) { b.authReconfig() } -// findExitNodeID updates b.prefs to reference an exit node by ID, +// findExitNodeIDLocked updates b.prefs to reference an exit node by ID, // rather than by IP. It returns whether prefs was mutated. -func (b *LocalBackend) findExitNodeID(nm *netmap.NetworkMap) (prefsChanged bool) { +func (b *LocalBackend) findExitNodeIDLocked(nm *netmap.NetworkMap) (prefsChanged bool) { // If we have a desired IP on file, try to find the corresponding // node. if b.prefs.ExitNodeIP.IsZero() {