Fix being able to enable/disable multicast

This commit is contained in:
Neil Alexander 2018-05-26 21:50:47 +01:00
parent bc899c395a
commit a0f547cc1b
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 13 additions and 7 deletions

View file

@ -16,6 +16,10 @@ type multicast struct {
func (m *multicast) init(core *Core) {
m.core = core
m.groupAddr = "[ff02::114]:9001"
// Check if we've been given any expressions
if len(m.core.ifceExpr) == 0 {
return
}
// Ask the system for network interfaces
allifaces, err := net.Interfaces()
if err != nil {