aboutsummaryrefslogtreecommitdiffstats
path: root/tun/tun_freebsd.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-11-07 21:56:32 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-07 21:56:32 +0100
commit82128c47d90a54faded017ad3e5bc61eb0c641db (patch)
tree91ec906e69ba373f1ef014dd1ce684cb459d44c8 /tun/tun_freebsd.go
parentmod: update deps (diff)
downloadwireguard-go-82128c47d90a54faded017ad3e5bc61eb0c641db.tar.xz
wireguard-go-82128c47d90a54faded017ad3e5bc61eb0c641db.zip
global: switch to using %w instead of %v for Errorf
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--tun/tun_freebsd.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tun/tun_freebsd.go b/tun/tun_freebsd.go
index c312219..174e7f8 100644
--- a/tun/tun_freebsd.go
+++ b/tun/tun_freebsd.go
@@ -287,7 +287,7 @@ func CreateTUN(name string, mtu int) (Device, error) {
if errno != 0 {
tunFile.Close()
tunDestroy(assignedName)
- return nil, fmt.Errorf("Unable to put into IFHEAD mode: %v", errno)
+ return nil, fmt.Errorf("Unable to put into IFHEAD mode: %w", errno)
}
// Open control sockets
@@ -328,7 +328,7 @@ func CreateTUN(name string, mtu int) (Device, error) {
if errno != 0 {
tunFile.Close()
tunDestroy(assignedName)
- return nil, fmt.Errorf("Unable to get nd6 flags for %s: %v", assignedName, errno)
+ return nil, fmt.Errorf("Unable to get nd6 flags for %s: %w", assignedName, errno)
}
ndireq.Flags = ndireq.Flags &^ ND6_IFF_AUTO_LINKLOCAL
ndireq.Flags = ndireq.Flags | ND6_IFF_NO_DAD
@@ -341,7 +341,7 @@ func CreateTUN(name string, mtu int) (Device, error) {
if errno != 0 {
tunFile.Close()
tunDestroy(assignedName)
- return nil, fmt.Errorf("Unable to set nd6 flags for %s: %v", assignedName, errno)
+ return nil, fmt.Errorf("Unable to set nd6 flags for %s: %w", assignedName, errno)
}
// Rename the interface
@@ -359,7 +359,7 @@ func CreateTUN(name string, mtu int) (Device, error) {
if errno != 0 {
tunFile.Close()
tunDestroy(assignedName)
- return nil, fmt.Errorf("Failed to rename %s to %s: %v", assignedName, name, errno)
+ return nil, fmt.Errorf("Failed to rename %s to %s: %w", assignedName, name, errno)
}
return CreateTUNFromFile(tunFile, mtu)