aboutsummaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
Diffstat (limited to 'device')
-rw-r--r--device/boundif_windows.go3
-rw-r--r--device/conn.go5
-rw-r--r--device/conn_linux.go5
-rw-r--r--device/cookie.go5
-rw-r--r--device/device.go5
-rw-r--r--device/kdf_test.go3
-rw-r--r--device/keypair.go3
-rw-r--r--device/mark_unix.go3
-rw-r--r--device/noise-helpers.go3
-rw-r--r--device/noise-protocol.go5
-rw-r--r--device/noise-types.go1
-rw-r--r--device/receive.go7
-rw-r--r--device/send.go7
-rw-r--r--device/tun.go3
-rw-r--r--device/uapi.go3
15 files changed, 38 insertions, 23 deletions
diff --git a/device/boundif_windows.go b/device/boundif_windows.go
index 97381ad..b842ba8 100644
--- a/device/boundif_windows.go
+++ b/device/boundif_windows.go
@@ -7,8 +7,9 @@ package device
import (
"encoding/binary"
- "golang.org/x/sys/windows"
"unsafe"
+
+ "golang.org/x/sys/windows"
)
const (
diff --git a/device/conn.go b/device/conn.go
index d57aa8c..7b341f6 100644
--- a/device/conn.go
+++ b/device/conn.go
@@ -7,10 +7,11 @@ package device
import (
"errors"
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
"net"
"strings"
+
+ "golang.org/x/net/ipv4"
+ "golang.org/x/net/ipv6"
)
const (
diff --git a/device/conn_linux.go b/device/conn_linux.go
index 06b15f9..ebbbe11 100644
--- a/device/conn_linux.go
+++ b/device/conn_linux.go
@@ -18,13 +18,14 @@ package device
import (
"errors"
- "golang.org/x/sys/unix"
- "golang.zx2c4.com/wireguard/rwcancel"
"net"
"strconv"
"sync"
"syscall"
"unsafe"
+
+ "golang.org/x/sys/unix"
+ "golang.zx2c4.com/wireguard/rwcancel"
)
const (
diff --git a/device/cookie.go b/device/cookie.go
index 2f21067..3a88a0c 100644
--- a/device/cookie.go
+++ b/device/cookie.go
@@ -8,10 +8,11 @@ package device
import (
"crypto/hmac"
"crypto/rand"
- "golang.org/x/crypto/blake2s"
- "golang.org/x/crypto/chacha20poly1305"
"sync"
"time"
+
+ "golang.org/x/crypto/blake2s"
+ "golang.org/x/crypto/chacha20poly1305"
)
type CookieChecker struct {
diff --git a/device/device.go b/device/device.go
index d6c96d6..ef269f5 100644
--- a/device/device.go
+++ b/device/device.go
@@ -6,12 +6,13 @@
package device
import (
- "golang.zx2c4.com/wireguard/ratelimiter"
- "golang.zx2c4.com/wireguard/tun"
"runtime"
"sync"
"sync/atomic"
"time"
+
+ "golang.zx2c4.com/wireguard/ratelimiter"
+ "golang.zx2c4.com/wireguard/tun"
)
const (
diff --git a/device/kdf_test.go b/device/kdf_test.go
index 11ea8d5..cb8dbab 100644
--- a/device/kdf_test.go
+++ b/device/kdf_test.go
@@ -7,8 +7,9 @@ package device
import (
"encoding/hex"
- "golang.org/x/crypto/blake2s"
"testing"
+
+ "golang.org/x/crypto/blake2s"
)
type KDFTest struct {
diff --git a/device/keypair.go b/device/keypair.go
index a9fbfce..9c78fa9 100644
--- a/device/keypair.go
+++ b/device/keypair.go
@@ -7,9 +7,10 @@ package device
import (
"crypto/cipher"
- "golang.zx2c4.com/wireguard/replay"
"sync"
"time"
+
+ "golang.zx2c4.com/wireguard/replay"
)
/* Due to limitations in Go and /x/crypto there is currently
diff --git a/device/mark_unix.go b/device/mark_unix.go
index a791c71..669b328 100644
--- a/device/mark_unix.go
+++ b/device/mark_unix.go
@@ -8,8 +8,9 @@
package device
import (
- "golang.org/x/sys/unix"
"runtime"
+
+ "golang.org/x/sys/unix"
)
var fwmarkIoctl int
diff --git a/device/noise-helpers.go b/device/noise-helpers.go
index 4b09bf3..03e6ec6 100644
--- a/device/noise-helpers.go
+++ b/device/noise-helpers.go
@@ -9,9 +9,10 @@ import (
"crypto/hmac"
"crypto/rand"
"crypto/subtle"
+ "hash"
+
"golang.org/x/crypto/blake2s"
"golang.org/x/crypto/curve25519"
- "hash"
)
/* KDF related functions.
diff --git a/device/noise-protocol.go b/device/noise-protocol.go
index 73826e1..1f70e81 100644
--- a/device/noise-protocol.go
+++ b/device/noise-protocol.go
@@ -7,12 +7,13 @@ package device
import (
"errors"
+ "sync"
+ "time"
+
"golang.org/x/crypto/blake2s"
"golang.org/x/crypto/chacha20poly1305"
"golang.org/x/crypto/poly1305"
"golang.zx2c4.com/wireguard/tai64n"
- "sync"
- "time"
)
const (
diff --git a/device/noise-types.go b/device/noise-types.go
index 82b12c1..6b1f16f 100644
--- a/device/noise-types.go
+++ b/device/noise-types.go
@@ -9,6 +9,7 @@ import (
"crypto/subtle"
"encoding/hex"
"errors"
+
"golang.org/x/crypto/chacha20poly1305"
)
diff --git a/device/receive.go b/device/receive.go
index 747a188..22870f2 100644
--- a/device/receive.go
+++ b/device/receive.go
@@ -8,14 +8,15 @@ package device
import (
"bytes"
"encoding/binary"
- "golang.org/x/crypto/chacha20poly1305"
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
"net"
"strconv"
"sync"
"sync/atomic"
"time"
+
+ "golang.org/x/crypto/chacha20poly1305"
+ "golang.org/x/net/ipv4"
+ "golang.org/x/net/ipv6"
)
type QueueHandshakeElement struct {
diff --git a/device/send.go b/device/send.go
index ccb28da..ae96aa2 100644
--- a/device/send.go
+++ b/device/send.go
@@ -8,13 +8,14 @@ package device
import (
"bytes"
"encoding/binary"
- "golang.org/x/crypto/chacha20poly1305"
- "golang.org/x/net/ipv4"
- "golang.org/x/net/ipv6"
"net"
"sync"
"sync/atomic"
"time"
+
+ "golang.org/x/crypto/chacha20poly1305"
+ "golang.org/x/net/ipv4"
+ "golang.org/x/net/ipv6"
)
/* Outbound flow
diff --git a/device/tun.go b/device/tun.go
index bc5f1f1..fe1158c 100644
--- a/device/tun.go
+++ b/device/tun.go
@@ -6,8 +6,9 @@
package device
import (
- "golang.zx2c4.com/wireguard/tun"
"sync/atomic"
+
+ "golang.zx2c4.com/wireguard/tun"
)
const DefaultMTU = 1420
diff --git a/device/uapi.go b/device/uapi.go
index fb62048..99cb421 100644
--- a/device/uapi.go
+++ b/device/uapi.go
@@ -8,13 +8,14 @@ package device
import (
"bufio"
"fmt"
- "golang.zx2c4.com/wireguard/ipc"
"io"
"net"
"strconv"
"strings"
"sync/atomic"
"time"
+
+ "golang.zx2c4.com/wireguard/ipc"
)
type IPCError struct {