From 55b56e8686473b7070fd0b72782fbf908e755407 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 19 Jul 2018 10:15:26 +0100 Subject: [PATCH] Normalise startup output for TUN/TAP on Linux and Windows --- src/yggdrasil/tun_linux.go | 4 ++++ src/yggdrasil/tun_windows.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/yggdrasil/tun_linux.go b/src/yggdrasil/tun_linux.go index 14c2f0a3..a1f8abdf 100644 --- a/src/yggdrasil/tun_linux.go +++ b/src/yggdrasil/tun_linux.go @@ -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) } diff --git a/src/yggdrasil/tun_windows.go b/src/yggdrasil/tun_windows.go index c6e57705..d3420df8 100644 --- a/src/yggdrasil/tun_windows.go +++ b/src/yggdrasil/tun_windows.go @@ -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) }