mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 15:20:30 +00:00
possibly fix weird issue I was having with netns, still not sure I understand why it was a problem
This commit is contained in:
parent
ccb23b6a56
commit
8b9a91be57
@ -236,6 +236,7 @@ func (c *Core) DEBUG_startTunWithMTU(ifname string, iftapmode bool, mtu int) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
c.log.Println("Setup TUN/TAP:", c.tun.iface.Name(), straddr)
|
||||||
go func() { panic(c.tun.read()) }()
|
go func() { panic(c.tun.read()) }()
|
||||||
}
|
}
|
||||||
go func() { panic(c.tun.write()) }()
|
go func() { panic(c.tun.write()) }()
|
||||||
|
@ -48,7 +48,8 @@ func (tun *tunDevice) setupAddress(addr string) error {
|
|||||||
}
|
}
|
||||||
for _, ifce := range ifces {
|
for _, ifce := range ifces {
|
||||||
if ifce.Name == tun.iface.Name() {
|
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 {
|
if netIF == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user