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
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
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)
}