Make multicasting use config instead of ifceExpr in Core

This commit is contained in:
Neil Alexander 2019-01-14 19:27:13 +00:00
parent 9e486ed4fe
commit f6b663c257
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 14 additions and 26 deletions

View file

@ -9,7 +9,6 @@ import (
"log"
"os"
"os/signal"
"regexp"
"strings"
"syscall"
@ -221,15 +220,6 @@ func main() {
// Setup the Yggdrasil node itself. The node{} type includes a Core, so we
// don't need to create this manually.
n := node{}
// Check to see if any multicast interface expressions were provided in the
// config. If they were then set them now.
for _, ll := range cfg.MulticastInterfaces {
ifceExpr, err := regexp.Compile(ll)
if err != nil {
panic(err)
}
n.core.AddMulticastInterfaceExpr(ifceExpr)
}
// Now that we have a working configuration, we can now actually start
// Yggdrasil. This will start the router, switch, DHT node, TCP and UDP
// sockets, TUN/TAP adapter and multicast discovery port.