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
()
| 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. |
| 776 | func (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 | |
| 783 | func (e *userspaceEngine) PatchDiscoKey(pub key.NodePublic, disco key.DiscoPublic) { |
| 784 | e.wgLock.Lock() |