wgengine: don't pass nil router.Config objects.

These are hard for swift to decode in the iOS app.

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
This commit is contained in:
Avery Pennarun
2020-05-31 02:36:57 -04:00
parent 5114df415e
commit f0b6ba78e8
3 changed files with 11 additions and 3 deletions

View File

@ -868,7 +868,7 @@ func (b *LocalBackend) enterState(newState State) {
b.blockEngineUpdates(true)
fallthrough
case Stopped:
err := b.e.Reconfig(&wgcfg.Config{}, nil)
err := b.e.Reconfig(&wgcfg.Config{}, &router.Config{})
if err != nil {
b.logf("Reconfig(down): %v", err)
}
@ -958,7 +958,7 @@ func (b *LocalBackend) stateMachine() {
// a status update that predates the "I've shut down" update.
func (b *LocalBackend) stopEngineAndWait() {
b.logf("stopEngineAndWait...")
b.e.Reconfig(&wgcfg.Config{}, nil)
b.e.Reconfig(&wgcfg.Config{}, &router.Config{})
b.requestEngineStatusAndWait()
b.logf("stopEngineAndWait: done.")
}