5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-23 06:25:40 +00:00

Normalise startup output for TUN/TAP on Linux and Windows

This commit is contained in:
Neil Alexander 2018-07-19 10:15:26 +01:00
parent df9cadd938
commit 55b56e8686
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944
2 changed files with 8 additions and 0 deletions

View File

@ -37,6 +37,10 @@ func (tun *tunDevice) setup(ifname string, iftapmode bool, addr string, mtu int)
tun.mtu = 65535-tun_ETHER_HEADER_LENGTH
}
}
// Friendly output
tun.core.log.Printf("Interface name: %s", tun.iface.Name())
tun.core.log.Printf("Interface IPv6: %s", addr)
tun.core.log.Printf("Interface MTU: %d", tun.mtu)
return tun.setupAddress(addr)
}

View File

@ -57,6 +57,10 @@ func (tun *tunDevice) setup(ifname string, iftapmode bool, addr string, mtu int)
if err != nil {
panic(err)
}
// Friendly output
tun.core.log.Printf("Interface name: %s", tun.iface.Name())
tun.core.log.Printf("Interface IPv6: %s", addr)
tun.core.log.Printf("Interface MTU: %d", tun.mtu)
return tun.setupAddress(addr)
}