More tweaks

This commit is contained in:
Neil Alexander 2022-02-09 18:52:33 +00:00
parent 8be919abba
commit d2200a3812
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 3 additions and 4 deletions

View file

@ -158,6 +158,6 @@ func main() {
case <-term:
}
n.Close()
_ = tuntap.Stop()
n.Close()
}

View file

@ -11,7 +11,6 @@ import (
"github.com/yggdrasil-network/yggdrasil-go/src/address"
"github.com/yggdrasil-network/yggdrasil-go/src/config"
"github.com/yggdrasil-network/yggdrasil-go/src/core"
"github.com/yggdrasil-network/yggdrasil-go/src/defaults"
"github.com/yggdrasil-network/yggdrasil-go/src/ipv6rwc"
"github.com/yggdrasil-network/yggdrasil-go/src/multicast"
"github.com/yggdrasil-network/yggdrasil-go/src/version"
@ -44,7 +43,7 @@ func (m *Yggdrasil) StartJSON(configjson []byte) error {
logger.EnableLevel("error")
logger.EnableLevel("warn")
logger.EnableLevel("info")
m.config = defaults.GenerateConfig()
m.config = config.GenerateConfig()
if err := json.Unmarshal(configjson, &m.config); err != nil {
return err
}
@ -107,7 +106,7 @@ func (m *Yggdrasil) Stop() error {
// GenerateConfigJSON generates mobile-friendly configuration in JSON format
func GenerateConfigJSON() []byte {
nc := defaults.GenerateConfig()
nc := config.GenerateConfig()
nc.IfName = "none"
if json, err := json.Marshal(nc); err == nil {
return json