diff --git a/src/yggdrasil/debug.go b/src/yggdrasil/debug.go index faa7471..e70e8a6 100644 --- a/src/yggdrasil/debug.go +++ b/src/yggdrasil/debug.go @@ -236,6 +236,7 @@ func (c *Core) DEBUG_startTunWithMTU(ifname string, iftapmode bool, mtu int) { if err != nil { panic(err) } + c.log.Println("Setup TUN/TAP:", c.tun.iface.Name(), straddr) go func() { panic(c.tun.read()) }() } go func() { panic(c.tun.write()) }() diff --git a/src/yggdrasil/tun_linux.go b/src/yggdrasil/tun_linux.go index 28cccda..42ff4a4 100644 --- a/src/yggdrasil/tun_linux.go +++ b/src/yggdrasil/tun_linux.go @@ -48,7 +48,8 @@ func (tun *tunDevice) setupAddress(addr string) error { } for _, ifce := range ifces { if ifce.Name == tun.iface.Name() { - netIF = &ifce + var newIF = ifce + netIF = &newIF // Don't point inside ifces, it's apparently unsafe?... } } if netIF == nil {