MCPcopy Create free account
hub / github.com/tailscale/tailscale / ResetAndStop

Method ResetAndStop

wgengine/userspace.go:776–781  ·  view source on GitHub ↗

ResetAndStop resets the engine to a clean state (like calling Reconfig with all pointers to zero values) and returns the resulting status. Unlike Reconfig, it does not return ErrNoChanges. The returned status will not be sent to the registered status callback; it is on the caller to ensure this st

()

Source from the content-addressed store, hash-verified

774// The returned status will not be sent to the registered status callback;
775// it is on the caller to ensure this status is handled appropriately.
776func (e *userspaceEngine) ResetAndStop() (*Status, error) {
777 if err := e.Reconfig(&wgcfg.Config{}, &router.Config{}, &dns.Config{}); err != nil && !errors.Is(err, ErrNoChanges) {
778 return nil, err
779 }
780 return e.getStatus()
781}
782
783func (e *userspaceEngine) PatchDiscoKey(pub key.NodePublic, disco key.DiscoPublic) {
784 e.wgLock.Lock()

Callers

nothing calls this directly

Calls 3

ReconfigMethod · 0.95
getStatusMethod · 0.95
IsMethod · 0.45

Tested by

no test coverage detected