4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-06-14 19:46:05 +00:00

Refactor admin socket somewhat, allow modules to set up their own handlers

This commit is contained in:
Neil Alexander
2019-05-19 22:02:04 +01:00
parent 8ef1978cb1
commit d575b83ec1
4 changed files with 379 additions and 400 deletions

View File

@ -196,6 +196,7 @@ func main() {
if err := n.multicast.Start(); err != nil {
logger.Errorln("An error occurred starting multicast:", err)
}
n.multicast.SetupAdminHandlers(&n.admin)
// Start the TUN/TAP interface
if listener, err := n.core.ConnListen(); err == nil {
if dialer, err := n.core.ConnDialer(); err == nil {
@ -203,6 +204,7 @@ func main() {
if err := n.tuntap.Start(); err != nil {
logger.Errorln("An error occurred starting TUN/TAP:", err)
}
n.tuntap.SetupAdminHandlers(&n.admin)
} else {
logger.Errorln("Unable to get Dialer:", err)
}