mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-23 02:01:36 +00:00
Normalise startup output for TUN/TAP on Linux and Windows
This commit is contained in:
parent
df9cadd938
commit
55b56e8686
@ -37,6 +37,10 @@ func (tun *tunDevice) setup(ifname string, iftapmode bool, addr string, mtu int)
|
|||||||
tun.mtu = 65535-tun_ETHER_HEADER_LENGTH
|
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)
|
return tun.setupAddress(addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,10 @@ func (tun *tunDevice) setup(ifname string, iftapmode bool, addr string, mtu int)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
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)
|
return tun.setupAddress(addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user