mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 06:05:06 +03:00
multicast configuration changes
This commit is contained in:
parent
4701f941a9
commit
de853fed10
9 changed files with 49 additions and 40 deletions
|
@ -102,13 +102,21 @@ func readConfig(log *log.Logger, useconf *bool, useconffile *string, normaliseco
|
|||
for _, oldmcval := range oldmcvals {
|
||||
if str, ok := oldmcval.(string); ok {
|
||||
newmc = append(newmc, config.MulticastInterfaceConfig{
|
||||
Regex: str,
|
||||
Incoming: true,
|
||||
Outgoing: true,
|
||||
Regex: str,
|
||||
Beacon: true,
|
||||
Listen: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
if newmc != nil {
|
||||
if oldport, ok := dat["LinkLocalTCPPort"]; ok {
|
||||
// numbers parse to float64 by default
|
||||
if port, ok := oldport.(float64); ok {
|
||||
for idx := range newmc {
|
||||
newmc[idx].Port = uint16(port)
|
||||
}
|
||||
}
|
||||
}
|
||||
dat["MulticastInterfaces"] = newmc
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue