mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-29 15:23:45 +00:00
ipn/ipnlocal: call authReconfig once per cc status update
Updates #12027 Signed-off-by: Nick Khyl <nickk@tailscale.com>
This commit is contained in:
parent
565ebbdeb8
commit
4c09ea6c24
@ -1550,13 +1550,23 @@ func (b *LocalBackend) SetControlClientStatus(c controlclient.Client, st control
|
|||||||
// Auth completed, unblock the engine
|
// Auth completed, unblock the engine
|
||||||
b.blockEngineUpdates(false)
|
b.blockEngineUpdates(false)
|
||||||
}
|
}
|
||||||
b.authReconfig()
|
|
||||||
b.send(ipn.Notify{LoginFinished: &empty.Message{}})
|
b.send(ipn.Notify{LoginFinished: &empty.Message{}})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lock b again and do only the things that require locking.
|
// Lock b again and do only the things that require locking.
|
||||||
b.mu.Lock()
|
b.mu.Lock()
|
||||||
|
|
||||||
|
// [LocalBackend.authReconfig] should be called once per control client status update,
|
||||||
|
// and only after the new netmap has been set.
|
||||||
|
//
|
||||||
|
// This is currently (2020-07-28) necessary; conditionally disabling it is fragile!
|
||||||
|
// This is where netmap information gets propagated to router and magicsock.
|
||||||
|
//
|
||||||
|
// TODO(nickkhyl): Revisit this after the state machine refactor.
|
||||||
|
// We shouldn't be calling it from five different places, and the authReconfig logic
|
||||||
|
// may need its own refactor.
|
||||||
|
defer b.authReconfig()
|
||||||
|
|
||||||
prefsChanged := false
|
prefsChanged := false
|
||||||
cn := b.currentNode()
|
cn := b.currentNode()
|
||||||
prefs := b.pm.CurrentPrefs().AsStruct()
|
prefs := b.pm.CurrentPrefs().AsStruct()
|
||||||
@ -1718,9 +1728,6 @@ func (b *LocalBackend) SetControlClientStatus(c controlclient.Client, st control
|
|||||||
b.setAuthURL(st.URL)
|
b.setAuthURL(st.URL)
|
||||||
}
|
}
|
||||||
b.stateMachine()
|
b.stateMachine()
|
||||||
// This is currently (2020-07-28) necessary; conditionally disabling it is fragile!
|
|
||||||
// This is where netmap information gets propagated to router and magicsock.
|
|
||||||
b.authReconfig()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type preferencePolicyInfo struct {
|
type preferencePolicyInfo struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user