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

@ -370,6 +370,10 @@ func configSignature(cfg *wgcfg.Config, routerCfg *router.Config) (string, error
}
func (e *userspaceEngine) Reconfig(cfg *wgcfg.Config, routerCfg *router.Config) error {
if routerCfg == nil {
panic("routerCfg must not be nil")
}
e.wgLock.Lock()
defer e.wgLock.Unlock()