mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 14:45:07 +03:00
Refactoring: move tuntap and icmpv6 into separate package
This commit is contained in:
parent
67c670ab4c
commit
0b494a8255
20 changed files with 307 additions and 240 deletions
|
@ -23,9 +23,8 @@ func (m *multicast) init(core *Core) {
|
|||
m.core = core
|
||||
m.reconfigure = make(chan chan error, 1)
|
||||
m.listeners = make(map[string]*tcpListener)
|
||||
m.core.configMutex.RLock()
|
||||
m.listenPort = m.core.config.LinkLocalTCPPort
|
||||
m.core.configMutex.RUnlock()
|
||||
current, _ := m.core.config.Get()
|
||||
m.listenPort = current.LinkLocalTCPPort
|
||||
go func() {
|
||||
for {
|
||||
e := <-m.reconfigure
|
||||
|
@ -70,9 +69,8 @@ func (m *multicast) start() error {
|
|||
|
||||
func (m *multicast) interfaces() map[string]net.Interface {
|
||||
// Get interface expressions from config
|
||||
m.core.configMutex.RLock()
|
||||
exprs := m.core.config.MulticastInterfaces
|
||||
m.core.configMutex.RUnlock()
|
||||
current, _ := m.core.config.Get()
|
||||
exprs := current.MulticastInterfaces
|
||||
// Ask the system for network interfaces
|
||||
interfaces := make(map[string]net.Interface)
|
||||
allifaces, err := net.Interfaces()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue