mirror of https://github.com/vishvananda/netlink
gofmt fixes
Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
This commit is contained in:
parent
de4cc349a5
commit
11eac9d2ec
|
@ -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)
|
||||
|
|
|
@ -13,5 +13,5 @@ import "C"
|
|||
type ifReq struct {
|
||||
Name [C.IFNAMSIZ]byte
|
||||
Flags uint16
|
||||
pad [C.IFREQ_SIZE-C.IFNAMSIZ-2]byte
|
||||
pad [C.IFREQ_SIZE - C.IFNAMSIZ - 2]byte
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue