diff --git a/link_linux.go b/link_linux.go index 638306b..0826285 100644 --- a/link_linux.go +++ b/link_linux.go @@ -6,8 +6,8 @@ import ( "fmt" "net" "os" - "unsafe" "syscall" + "unsafe" "github.com/vishvananda/netlink/nl" ) @@ -294,7 +294,7 @@ func LinkAdd(link Link) error { // TODO: support pi | vnet_hdr | multi_queue // TODO: support non- exclusive // TODO: support non- persistent - if (tuntap.Mode < syscall.IFF_TUN || tuntap.Mode > syscall.IFF_TAP) { + if tuntap.Mode < syscall.IFF_TUN || tuntap.Mode > syscall.IFF_TAP { return fmt.Errorf("Tuntap.Mode %v unknown!", tuntap.Mode) } file, err := os.OpenFile("/dev/net/tun", os.O_RDWR, 0) diff --git a/link_tuntap_linux.go b/link_tuntap_linux.go index bfee56a..2d90c22 100644 --- a/link_tuntap_linux.go +++ b/link_tuntap_linux.go @@ -11,7 +11,7 @@ package netlink import "C" type ifReq struct { - Name [C.IFNAMSIZ]byte + Name [C.IFNAMSIZ]byte Flags uint16 - pad [C.IFREQ_SIZE-C.IFNAMSIZ-2]byte + pad [C.IFREQ_SIZE - C.IFNAMSIZ - 2]byte }