From: Brad Fitzpatrick Date: Fri, 28 Feb 2020 16:53:29 +0000 (-0800) Subject: tun: remove unused isUp method X-Git-Tag: 0.0.20201118~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abd287159e7eb7d20ee46c03d1a8cb9a645735e4;p=thirdparty%2Fwireguard-go.git tun: remove unused isUp method Signed-off-by: Brad Fitzpatrick --- diff --git a/tun/tun_linux.go b/tun/tun_linux.go index 7ab0623..17b8822 100644 --- a/tun/tun_linux.go +++ b/tun/tun_linux.go @@ -12,7 +12,6 @@ import ( "bytes" "errors" "fmt" - "net" "os" "sync" "syscall" @@ -164,11 +163,6 @@ func (tun *NativeTun) routineNetlinkListener() { } } -func (tun *NativeTun) isUp() (bool, error) { - inter, err := net.InterfaceByName(tun.name) - return inter.Flags&net.FlagUp != 0, err -} - func getIFIndex(name string) (int32, error) { fd, err := unix.Socket( unix.AF_INET,